diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..660be1acc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +**/.git +**/.vs +**/bin +**/obj +**/node_modules +*.user \ No newline at end of file diff --git a/README.en.md b/README.en.md index fb79ea7d0..2f9634d40 100644 --- a/README.en.md +++ b/README.en.md @@ -8,7 +8,7 @@ This is a [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) -based Abp ## Build -[![Build](https://github.com/colinin/abp-next-admin/actions/workflows/build.yml/badge.svg)](https://github.com/colinin/abp-next-admin/actions/workflows/build.yml) +[![Build](https://github.com/colinin/abp-next-admin/actions/workflows/build.yml/badge.svg)](https://github.com/colinin/abp-next-admin/actions/workflows/build.yml) [![NuGet](https://img.shields.io/nuget/v/LINGYUN.Abp.Core.svg?style=flat-square)](https://www.nuget.org/packages/LINGYUN.Abp.Core) ## Deployment Options @@ -23,43 +23,44 @@ If you don't need a microservices architecture, you can choose the monolithic se If you need higher scalability and a more flexible service architecture, you can choose the microservices deployment option. -## Quick Start +## Quick Start of a Microservice Project -### 0、Configurate hosts -windows: modify C:\Windows\System32\drivers\etc\hosts ; -linux: modify /etc/hosts; -add config: +### 0. Configure the hosts file + +On Windows, modify C:\Windows\System32\drivers\etc\hosts ; +on Linux, modify /etc/hosts ; +add the following entry: ``` 127.0.0.1 host.docker.internal ``` -In linux, execute restart network command: +On Linux, restart the network after changing the hosts file: ```shell /etc/init.d/network restart ``` -### 1、Install cli +### 1. Install the dotnet tool ```shell dotnet tool install --global LINGYUN.Abp.Cli ``` -### 2、Install .NET Template +### 2. Install the .NET template ```shell dotnet new --install LINGYUN.Abp.MicroService.Templates ``` -### 3、Use cli create new project +### 3. Create a project with the CLI ```shell - # use sqlserver - # MyCompanyName you company name - # MyProjectName you project name - # MyPackageName you package name - # -o See: abp cli - # --dbms See: abp cli - # --cs See: abp cli - # --no-random-port See: abp cli + # Initialize a project with a sqlserver connection string + # MyCompanyName company name + # MyProjectName project name + # MyPackageName package name + # -o output to the specified directory, see abp cli + # --dbms specify the database provider, see abp cli + # --cs specify the database connection string, see abp cli + # --no-random-port do not use random ports (app port 5000, dapr listening port 3500 by default) labp create MyCompanyName.MyProjectName -pk MyPackageName -o "D:\Project" --dbms sqlserver --cs "Server=127.0.0.1;Database=MyProject;User Id=sa;Password=123456" --no-random-port cd D:\Project\host\MyPackageName.MyCompanyName.MyProjectName.HttpApi.Host @@ -74,7 +75,7 @@ In linux, execute restart network command: ### Feedback -* The author is not a freelancer and does not have much time to maintain the project. If there is a problem, please contact **colin.in@foxmail.com** by email +* The author is not a freelancer and does not have much time to maintain the project. If you have any problems, you can contact **colin.in@foxmail.com** by email ## Screenshots @@ -92,7 +93,7 @@ In linux, execute restart network command: ![Settings](./apps/vue/images/settings.png) -![Dynamic Manus](./apps/vue/images/menus.png) +![Dynamic Menus](./apps/vue/images/menus.png) ![Organization Unit](./apps/vue/images/organization-unit.png) @@ -100,13 +101,15 @@ In linux, execute restart network command: ## Related Projects +Backend projects + [abpframework/abp](https://github.com/abpframework/abp) (abp vNext) [EasyAbp/Cap](https://github.com/EasyAbp/Abp.EventBus.CAP) (EasyAbp) [DotNetCore/CAP](https://github.com/dotnetcore/CAP) (CAP) -Javascript version: +Frontend projects [vue-vben-admin](https://github.com/anncwb/vue-vben-admin.git) (vue-vben-admin) @@ -123,163 +126,312 @@ Javascript version: ## Project Structure -```bash -├── mock/ # mock server & mock data -├── public # public static assets (directly copied) -│ │── favicon.ico # favicon -│ │── manifest.json # PWA config file -│ └── index.html # index.html template -├── src # main source code -│ ├── api # api service -│ ├── assets # module assets like fonts, images (processed by webpack) -│ ├── components # global components -│ ├── directives # global directives -│   ├── enums # global enums -│   ├── hooks # global hooks -│   ├── locales # locales -│   ├── layout # layouts -│ ├── router # router -│   ├── settings # global settings -│ ├── store # store -│ ├── utils # global utils -│ ├── views # views -│ ├── App.vue # main app component -│ ├── main.ts # app entry file -├── types # types -├── tests/ # tests -├── .env.xxx # env variable configuration -├── .eslintrc.js # eslint config -├── jest.config.js # jest unit test config -├── package.json # package.json -├── postcss.config.js # postcss config -├── tsconfig.json # typescript config -└── vite.config.js # vue vite config -``` - -## Project setup - -With [yarn](https://yarnpkg.com/lang/en/) or [npm](https://www.npmjs.com/get-npm) - - -#### Install dependencies +### Frontend: apps/vben5 (a pnpm workspace + turbo monorepo) ```bash -yarn install - +apps/vben5/ +├── apps/ # Independently runnable UI applications +│ ├── app-antd/ # ABP business frontend (the one in use: pnpm dev:app / pnpm build:app) +│ ├── web-antd/ # Official vben antd demo application +│ ├── web-antdv-next/ # antdv-next demo application +│ ├── web-ele/ # Element Plus demo application +│ ├── web-naive/ # Naive UI demo application +│ └── web-tdesign/ # TDesign demo application +├── packages/ +│ ├── @abp/ # ABP business module packages (27 in total) +│ │ ├── account/ # Account, external logins (third-party account binding) +│ │ ├── ai-management/ # AI management (workspaces, tools, agents) +│ │ ├── auditing/ # Audit logs and security logs +│ │ ├── blob-management/ # Object storage (containers, files) +│ │ ├── cache-management/ # Cache management +│ │ ├── components/ # Shared ABP business components +│ │ ├── core/ # ABP frontend core (request, permissions, menus, etc.) +│ │ ├── data-protection/ # Data protection (entity/field level access control) +│ │ ├── demo/ # Demo module +│ │ ├── features/ # Feature management +│ │ ├── gdpr/ # GDPR data export and deletion +│ │ ├── identity/ # Users, roles, organization units, sessions, login logs +│ │ ├── localization/ # Localization (languages, resources, texts) +│ │ ├── notifications/ # Notifications (definitions, my notifications, send records) +│ │ ├── openiddict/ # OpenIddict (applications, scopes, authorizations, tokens) +│ │ ├── oss/ # OSS/Blob file list +│ │ ├── permissions/ # Permission definitions and grants +│ │ ├── platform/ # Platform (layouts, menus, data dictionaries, email/SMS) +│ │ ├── request/ # HTTP request wrapper (token, error handling, tenant header) +│ │ ├── saas/ # Tenants and editions +│ │ ├── settings/ # Setting definitions and values +│ │ ├── signalr/ # SignalR real-time communication +│ │ ├── tasks/ # Background tasks (job management) +│ │ ├── text-templating/ # Text templates +│ │ ├── ui/ # ABP frontend UI component library +│ │ ├── webhooks/ # Webhook definitions, subscriptions and send attempts +│ │ └── wechat/ # WeChat (official account, WeCom, etc.) +│ ├── @core/ # Core: base / ui-kit / forward +│ ├── effects/ # Shared capabilities: plugins / hooks / common-ui, etc. +│ ├── icons/ types/ # Icons and type definitions +│ └── ... # The remaining shared packages (see pnpm-workspace.yaml) +├── internal/ # Engineering configuration: vite-config / lint-configs / tailwind-config / tsconfig / node-utils +├── docs/ # VitePress documentation +├── playground/ # Component and example playground +├── scripts/ # Cleanup, build and deployment scripts +├── package.json # Root scripts: dev / dev:app / build:app / lint / format / test:unit / check:type +├── pnpm-workspace.yaml # Workspace layout and dependency catalog +├── turbo.json # turbo pipeline configuration +└── vitest.config.ts # Unit test (vitest) configuration ``` -### Custom vue project config - -Modify the server address that the development environment will use for the proxy. Provide the following three addresses: IdentityService, IdentityServer, and ApiService +### Backend: aspnet-core and the surrounding directories ```bash -VITE_PROXY = [["/connect","http://127.0.0.1:44385"],["/api","http://127.0.0.1:30000"],["/signalr-hubs","ws://127.0.0.1:30000"]] +. +├── aspnet-core/ +│ ├── services/ # Service hosts (each with its own Dockerfile) +│ │ ├── LINGYUN.Abp.MicroService.AuthServer/ # Auth server (STS, 44385) +│ │ ├── LINGYUN.Abp.MicroService.IdentityService/ # Identity service (30015) +│ │ ├── LINGYUN.Abp.MicroService.AdminService/ # Admin service (30010) +│ │ ├── LINGYUN.Abp.MicroService.LocalizationService/# Localization service (30030) +│ │ ├── LINGYUN.Abp.MicroService.PlatformService/ # Platform service (30025) +│ │ ├── LINGYUN.Abp.MicroService.MessageService/ # Message service (30020) +│ │ ├── LINGYUN.Abp.MicroService.TaskService/ # Task service (30040) +│ │ ├── LINGYUN.Abp.MicroService.WebhookService/ # Webhook service (30045) +│ │ ├── LINGYUN.Abp.MicroService.WorkflowService/ # Workflow service (30050) +│ │ ├── LINGYUN.Abp.MicroService.WeChatService/ # WeChat service (30060) +│ │ ├── LINGYUN.Abp.MicroService.AIService/ # AI service (30070) +│ │ ├── LY.MicroService.Applications.Single/ # Monolith (30000, gateway and all modules merged) +│ │ ├── LY.MicroService.IdentityServer/ # IdentityServer based services and hosts +│ │ ├── LINGYUN.Abp.Applications/ LY.AIO.Applications.Single/ # Other hosts +│ │ └── Publish/ # Publish output directory (used by the container image builds) +│ ├── modules/ # Business modules, each layered by DDD (Domain / Application / EntityFrameworkCore / HttpApi ...) +│ │ ├── account/ # Account and sign-in (OpenIddict/IdentityServer web integration, captcha) +│ │ ├── identity/ # Users, roles, organization units, sessions, login logs +│ │ ├── identityServer/ # IdentityServer4 based implementation +│ │ ├── openIddict/ # OpenIddict server (applications, scopes, tokens, Portal, QR code, SMS, WeChat) +│ │ ├── permissions-management/ # Permission management and grants +│ │ ├── saas/ # Multi-tenancy and editions +│ │ ├── settings/ feature-management/ # Settings and features +│ │ ├── localization-management/ text-templating/ # Localization and text templates +│ │ ├── auditing/ data-protection/ gdpr/ captcha/ # Auditing, data protection, GDPR, captcha +│ │ ├── blob-management/ caching-management/ # Object storage and cache management +│ │ ├── platform/ project/ system-info/ demo/ # Platform, project, system info, demo +│ │ ├── realtime-message/ realtime-notifications/ # Instant messaging and real-time notifications +│ │ ├── task-management/ rules-management/ webhooks/ # Background tasks, rules engine, webhooks +│ │ ├── ai/ elsa/ # AI capabilities and workflow (Elsa) +│ ├── framework/ # Base framework packages (33 groups), the most used ones: +│ │ ├── common/ core packages (LINGYUN.Abp.Core, CAP, Hangfire, BlobStoring, SignalR ...) +│ │ ├── security/ authentication/ authorization/ # Security, sign-in methods, authorization +│ │ ├── auditing/ logging/ telemetry/ # Auditing, logging, tracing (OpenTelemetry/SkyWalking) +│ │ ├── multi-tenancy: tenants/ # Multi-tenancy and editions +│ │ ├── wechat/ wx-pusher/ pushplus/ tui-juhe/ # WeChat and message push +│ │ ├── cloud-aliyun/ cloud-tencent/ # Aliyun and Tencent Cloud integration +│ │ ├── dapr/ elasticsearch/ efcore/ data-protection/ # Dapr, Elasticsearch, EF Core, data protection +│ │ ├── dynamic-queryable/ dynamic-definition/ exporter/ # Dynamic query, dynamic definitions, import/export +│ │ ├── localization/ settings/ features/ mvc/ open-api/ cli/ ... # Other base packages +│ ├── migrations/ # DbMigrator and EntityFrameworkCore migration projects of each service (run by deploy.ps1) +│ ├── aspire/ # .NET Aspire: LINGYUN.Abp.MicroService.AppHost and the Aspire hosts of each service +│ ├── templates/ # dotnet new project templates (micro / aio) +│ ├── tests/ # Unit test projects +│ ├── LINGYUN.MicroService.All.slnx # Full solution +│ ├── LINGYUN.MicroService.Aspire.slnx # Aspire solution +│ └── LINGYUN.MicroService.SingleProject.slnx # Monolith solution +├── gateways/ +│ ├── internal/ # Internal gateway (YARP): Internal.Gateway / OpenApi.Gateway + yarp*.json routes +│ └── web/ # Web gateway: LY.MicroService.ApiGateway +├── apps/ # Frontend: vben5 (current) / vue (legacy) +├── build/ # Build and migration scripts: build-aspnetcore-ef-update.ps1, build-aspnetcore-docker-build.ps1 ... +├── deploy/ # One-click deployment script (deploy.ps1), middleware data and service log directories +├── docs/ # Documentation (monolith startup guide, etc.) +├── docker-compose.yml # Backend service orchestration +├── docker-compose.override.yml # Image tags, volumes and startup order +├── docker-compose.override.configuration.yml # Environment variables of each service (connection strings, CAP, Redis, Elasticsearch, ...) +├── docker-compose.middleware.yml # Middleware: MySQL/Redis/RabbitMQ/Elasticsearch/Kibana/Logstash/OpenObserve +├── docker-compose.override.agile.yml # AgileConfig configuration center (optional) +├── Directory.Build.props Directory.Packages.props NuGet.Config common.props # Shared build and package version management +└── README.md README.en.md RELEASE.md LICENSE # Documentation and license ``` -Modify the actual address of the production environment, as above +## Starting the Project -```bash -# STS Connect -# token issue -VITE_GLOB_AUTHORITY='http://127.0.0.1:44385' -# client id -VITE_GLOB_CLIENT_ID='vue-admin-element' -# client secret -VITE_GLOB_CLIENT_SECRET='1q2w3e*' -``` +Three startup options are provided; choose the one that fits your needs: -### EntityFramework migration +| Option | Description | Middleware | Frontend | +| --- | --- | --- | --- | +| Option 1: Microservices | Full microservices architecture, all backends run as containers | Must **start first**: `docker-compose.middleware.yml` | Start vben5 separately | +| Option 2: Aspire | AppHost orchestrates a local microservices development environment | AppHost creates the containers automatically (PostgreSQL/Redis/RabbitMQ/Elasticsearch/Kibana) | Started automatically by AppHost | +| Option 3: Monolith | Gateway, authentication and business modules merged into a single process | Must **start first**: `docker-compose.middleware.yml` | Start vben5 separately | -Please switch to the service project startup directory and execute the **dotnet EF ** command for database migration +### Prerequisites -example: +- **.NET SDK 10** (`dotnet --version`) +- **Docker / Docker Compose** (middleware for options 1 and 3; option 2 also relies on Docker for its middleware containers) +- **Node.js 20+ and pnpm** (the frontend lives in `apps/vben5`, a pnpm monorepo; `preinstall` runs `only-allow pnpm`) +- **hosts**: on Windows edit `C:\Windows\System32\drivers\etc\hosts`, on Linux edit `/etc/hosts`, and add the following entry + ``` + 127.0.0.1 host.docker.internal + ``` + (containers reach the middleware on the host through `extra_hosts: host.docker.internal:host-gateway`) -``` shell +--- -cd aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host +### Option 1: Microservices -dotnet ef database update +#### 1) One-click startup: deploy/deploy.ps1 +```powershell +cd ./deploy +powershell -ExecutionPolicy Bypass -File .\deploy.ps1 ``` -- You can also use quick migration script files: **./build/build-aspnetcore-ef-update.ps1** +The script performs the following steps (see `deploy/deploy.ps1`): -### Configure the RabbitMQ +1. Starts the middleware: `docker-compose -f .\docker-compose.middleware.yml -p labp up -d --build` (MySQL, Redis, RabbitMQ, Elasticsearch, Kibana, Logstash, OpenObserve) +2. Waits 30 seconds for MySQL initialization to complete +3. Runs the 8 database migration projects one by one (`dotnet run --no-build`, **so the backend must have been built before running the script**) +4. Builds the 12 backend images (`labp-*-service:10.6.0`) +5. Starts the backend: `docker-compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.override.configuration.yml -p labp up -d` +6. Runs `pnpm dev:app` under `apps/vben5` to start the frontend -Therefore project design for the micro service architecture, with the method of distributed event, communication between project USES is [DotNetCore/CAP](https://github.com/dotnetcore/CAP) +Notes: -The communication mode is **RabbitMQ Server**, so you need to install **RabbitMQ** in advance. Please refer to the official website for the specific installation mode +- The script must be executed in the **deploy directory** (it uses relative paths internally). +- The script calls `docker-compose` (Compose V1 command); if only the Compose V2 plugin is installed on your machine, replace `docker-compose` with `docker compose` in the script. +- The script does not include AgileConfig (`docker-compose.override.agile.yml`); all configuration comes from `docker-compose.override.configuration.yml`. +#### 2) Manual startup (equivalent to the script; make sure the middleware is started first) +```powershell +# 1) Start the middleware (must be first) +docker-compose -f .\docker-compose.middleware.yml -p labp up -d +# On the first run, wait at least 30 seconds so that MySQL can execute the init scripts under deploy/mysql/docker-entrypoint-initdb.d -Then you need to change the **CAP:RabbitMQ** configuration in the configuration file to set it to your own defined configuration. The **rabbitmq_management** plug-in is recommended for quick management of **RabbitMQ** +# 2) Database migration: use the migration script (it runs dotnet run for each of the 8 *.DbMigrator projects under aspnet-core/migrations, and builds automatically) +cd .\build +.\build-aspnetcore-ef-update.ps1 +# 3) Build the backend images: produces the 12 labp-*-service:10.6.0 images (the tags must match the image values in docker-compose.override.yml) +.\build-aspnetcore-docker-build.ps1 -### Compiles background services +# 4) Start the backend (all three compose files are required) +docker-compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.override.configuration.yml -p labp up -d -```shell -cd aspnet-core/services +# 5) Start the frontend +cd .\apps\vben5 +pnpm install +pnpm dev:app +``` + +Notes on the manual steps: -start-all-service.bat +- Both scripts in steps 2 and 3 must be executed in the **build directory** (they reference `./build-aspnetcore-common.ps1` relatively). +- `build-aspnetcore-ef-update.ps1` uses `dotnet run` internally (it builds first, then runs), so the manual flow does **not** require a pre-built backend; the one-click `deploy.ps1` uses `dotnet run --no-build`, so the backend must be built before running it. +- To migrate only a single service, run it from its own directory, for example: + ```powershell + cd .\aspnet-core\migrations\LINGYUN.Abp.MicroService.AuthServer.DbMigrator + dotnet run + ``` + +#### 3) Endpoints + +| Component | Address | +| --- | --- | +| Frontend (vben5, `@abp/app-antd`) | http://localhost:5666 | +| API Gateway | http://localhost:30000 | +| Auth Server (STS) | http://localhost:44385 | +| Identity / Admin / Platform / Message / Localization | 30015 / 30010 / 30025 / 30020 / 30030 | +| Task / Webhook / Workflow / WeChat / AI | 30040 / 30045 / 30050 / 30060 / 30070 | +| Kibana | http://localhost:5601 | +| RabbitMQ management | http://localhost:15672 (admin / 123456) | +| MySQL | localhost:3306 (root / 123456, database `abp`) | +| Redis | localhost:6379 | +| OpenObserve console | http://localhost:5080 (admin@abp.io / ww1Z5L%6) | + +### Option 2: Aspire + +The AppHost brings up its own middleware containers (PostgreSQL, Redis, RabbitMQ, Elasticsearch, Kibana), automatically runs the database migration projects of each service in the Development environment, and automatically starts the vben5 frontend with `pnpm dev:app`, so there is **no need** to start `docker-compose.middleware.yml` as well. + +```powershell +cd ./aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost +aspire run ``` -#### Compiles and hot-reloads for development +- The Aspire CLI must be installed (the version must match the AppHost's `Aspire.AppHost.Sdk` 13.x): `dotnet tool install --global Aspire.Cli`; if you prefer not to install the CLI, you can simply run `dotnet run --project .\LINGYUN.Abp.MicroService.AppHost.csproj`. +- Docker must be running, and `apps/vben5` must already have run `pnpm install` (the AppHost runs `pnpm dev:app`, and the frontend port is fixed at 5666). +- After startup the terminal prints the Aspire Dashboard address, where you can inspect resource status, logs and traces. +- The host ports used by the AppHost fully overlap with the middleware of option 1 (6379/9200/5601/5672/15672/5432, etc.) — **do not run it at the same time as the option 1 middleware**. -```shell +### Option 3: Monolith -cd apps/vue +The monolith merges the gateway, authentication and all business modules into a single process, but it **still depends on the middleware, so the middleware must be started first**: -yarn dev +```powershell +# 1) Start the middleware +docker-compose -f .\docker-compose.middleware.yml -p labp up -d +# On the first run, wait at least 30 seconds +# 2) Start the monolith +cd .\aspnet-core\services\LY.MicroService.Applications.Single +dotnet run --launch-profile Single.MySql.Dev + +# 3) Start the frontend +cd .\apps\vben5 +pnpm install +pnpm dev:app ``` -#### Compiles and minifies for production +- Default address **http://localhost:30000**: both `App:SelfUrl` and `AuthServer:Authority` point to it, so the token endpoint and the API share the same port. +- **Specify the profile explicitly**: without `--launch-profile`, `dotnet run` uses the first profile in `launchSettings.json` (currently `Single.PostgreSql.Dev`). With the default database (MySQL) use `Single.MySql.Dev`; the other options are `Single.PostgreSql.Dev` and `Single.SqlServer.Dev`. +- The connection strings of each database can be found in `appsettings.Development.MySql.json` / `appsettings.Development.PostgreSql.json` / `appsettings.Development.SqlServer.json`. -```bash -yarn run build -``` +### Troubleshooting -### About Docker container +- **`docker-compose` command not found**: the scripts use the Compose V1 command; if only Compose V2 is installed, use `docker compose` instead. +- **Image `labp-*-service:10.6.0` not found**: `docker-compose.override.yml` references pre-built images through `image:`, so run `build/build-aspnetcore-docker-build.ps1` first (option 1, manual startup, step 3). +- **One-click migration fails (`dotnet run --no-build`)**: `deploy.ps1` uses `--no-build` internally, so the backend must be built before running the script (`dotnet build .\aspnet-core\LINGYUN.MicroService.All.slnx`); for manual migration use **build/build-aspnetcore-ef-update.ps1** instead (it uses `dotnet run` and builds automatically). +- **Frontend dependency installation fails**: `apps/vben5` enforces pnpm (`preinstall` runs `only-allow pnpm`), so use `pnpm install` / `pnpm dev:app`. +- **Containers cannot reach the middleware on the host**: make sure the hosts file contains `127.0.0.1 host.docker.internal`. -**Step 1**: Building background services, powershell script: **./build/build-aspnetcore-release.ps1**, **Warning: after the release of service need configuration file: appsettings.Production.json** +--- -**Step 2**: Build the front-end, **./build/build-vue-apps.ps1** +### Lints and fixes files -**Step 3**: Build after the release of the address of the default in **./aspnet-core/services/Publish**, change nginx proxy server address: **./client/docker/nginx/default.conf** +Run the following in `apps/vben5` (vben5 enforces pnpm): -**Step 4**: Run command **sudo docker-compose down && sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build -d** +```bash +cd apps/vben5 -**Using A CI tool such as Jenkins is recommended to simplify this into a single step** +# lint +pnpm lint -#### Lints and fixes files +# auto-fix +pnpm format -```bash -yarn lint:eslint +# type check +pnpm check:type ``` -#### Run your unit tests +### Run your unit tests ```bash -yarn run test:unit -``` +cd apps/vben5 +pnpm test:unit +``` ## How to contribute -You are very welcome to join!Raise an issue Or submit a Pull Request。 +You are very welcome to join! Raise an issue or submit a Pull Request. **Pull Request:** -1. Fork code! +1. Fork the code! 2. Create your own branch: `git checkout -b feat/xxxx` 3. Submit your changes: `git commit -am 'feat(function): add xxxxx'` 4. Push your branch: `git push origin feat/xxxx` -5. submit`pull request` +5. Submit a `pull request` ## Git Contribution submission specification -- reference [vue](./apps/vue/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) +- Reference the [vue](./apps/vue/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)) - `feat` Add new features - `fix` Fix the problem/BUG @@ -295,18 +447,6 @@ You are very welcome to join!Raise an issue Or submit a Pull Request。 - `types` Type definition file changes - `wip` In development -## Related warehouse - -If these plugins are helpful to you, you can give a star support - -- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock -- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression -- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - Used for component library style introduction on demand -- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - Used for online switching of theme colors and other color-related configurations -- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - Used to pack compressed image resources -- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files -- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite - ## Browser support The `Chrome 80+` browser is recommended for local development @@ -318,11 +458,11 @@ Support modern browsers, not IE | not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | + ## License [MIT License](./LICENSE) - ## Thanks -![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png) \ No newline at end of file +![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg) diff --git a/README.md b/README.md index d1143f3dd..1c6d24386 100644 --- a/README.md +++ b/README.md @@ -125,148 +125,295 @@ linux下,修改完hosts后需要重启网络,在shell中执行: ## 目录结构 -本项目已经为你生成了一个完整的开发框架,提供了涵盖后台开发的各类功能和坑位,下面是整个项目的目录结构。 +### 前端:apps/vben5(pnpm workspace + turbo 的 monorepo) ```bash -├── mock # mock 服务器 与 模拟数据 -├── public # 静态资源 (会被直接复制) -│ │── favicon.ico # favicon图标 -│ │── manifest.json # PWA 配置文件 -│   └── index.html # html模板 -├── src # 源代码 -│   ├── api # 所有请求 -│   ├── assets # 主题 字体等静态资源 (由 webpack 处理加载) -│   ├── components # 全局组件 -│   ├── directive # 全局指令 -│   ├── enums # 全局枚举 -│   ├── hooks # 全局hooks -│   ├── locales # 国际化 -│   ├── layout # 全局布局 -│   ├── router # 路由 -│   ├── settings # 全局 配置 -│   ├── store # 全局 vuex store -│   ├── utils # 全局方法 -│   ├── views # 所有页面 -│   ├── App.vue # 入口页面 -│   └── main.js # 入口文件 加载组件 初始化等 -├── types # ts类型 -├── tests # 测试 -├── .env.xxx # 环境变量配置 -├── .eslintrc.js # eslint 配置 -├── jest.config.js # jest 单元测试配置 -├── package.json # package.json 依赖 -├── postcss.config.js # postcss 配置 -├── tsconfig.json # typescript 配置 -└── vite.config.js # vue vite 配置 +apps/vben5/ +├── apps/ # 可独立运行的 UI 应用 +│ ├── app-antd/ # ABP 业务前端(当前使用:pnpm dev:app / pnpm build:app) +│ ├── web-antd/ # vben 官方 antd 示例应用 +│ ├── web-antdv-next/ # antdv-next 示例应用 +│ ├── web-ele/ # Element Plus 示例应用 +│ ├── web-naive/ # Naive UI 示例应用 +│ └── web-tdesign/ # TDesign 示例应用 +├── packages/ +│ ├── @abp/ # ABP 业务模块包(27 个) +│ │ ├── account/ # 账户、外部登录(第三方账号绑定) +│ │ ├── ai-management/ # AI 管理(工作区、工具、智能体) +│ │ ├── auditing/ # 审计日志、安全日志 +│ │ ├── blob-management/ # 对象存储(容器、文件) +│ │ ├── cache-management/ # 缓存管理 +│ │ ├── components/ # ABP 前端通用业务组件 +│ │ ├── core/ # ABP 前端核心(请求、权限、菜单等基础能力) +│ │ ├── data-protection/ # 数据保护(实体/字段级访问控制) +│ │ ├── demo/ # 示例模块 +│ │ ├── features/ # 特性(Feature)管理 +│ │ ├── gdpr/ # GDPR 数据导出与删除 +│ │ ├── identity/ # 用户、角色、组织机构、会话、登录日志 +│ │ ├── localization/ # 本地化(语言、资源、文本) +│ │ ├── notifications/ # 通知(通知定义、我的通知、发送记录) +│ │ ├── openiddict/ # OpenIddict(应用、作用域、授权、令牌) +│ │ ├── oss/ # OSS/Blob 文件列表 +│ │ ├── permissions/ # 权限定义与授权 +│ │ ├── platform/ # 平台(布局、菜单、数据字典、邮件/短信) +│ │ ├── request/ # HTTP 请求封装(令牌、错误处理、租户头) +│ │ ├── saas/ # 租户与版本(Edition) +│ │ ├── settings/ # 设置定义与设置值 +│ │ ├── signalr/ # SignalR 实时通信 +│ │ ├── tasks/ # 后台任务(作业管理) +│ │ ├── text-templating/ # 文本模板 +│ │ ├── ui/ # ABP 前端 UI 组件库 +│ │ ├── webhooks/ # Webhook 定义、订阅与发送记录 +│ │ └── wechat/ # 微信(公众号、企业微信等) +│ ├── @core/ # 内核:base / ui-kit / forward +│ ├── effects/ # 通用能力:plugins / hooks / common-ui 等 +│ ├── icons/ types/ # 图标、类型定义 +│ └── ... # 其余公共包(见 pnpm-workspace.yaml) +├── internal/ # 工程化配置:vite-config / lint-configs / tailwind-config / tsconfig / node-utils +├── docs/ # VitePress 文档 +├── playground/ # 组件与示例演练场 +├── scripts/ # 清理、构建、部署等脚本 +├── package.json # 根脚本:dev / dev:app / build:app / lint / format / test:unit / check:type +├── pnpm-workspace.yaml # workspace 划分与依赖 catalog +├── turbo.json # turbo 流水线配置 +└── vitest.config.ts # 单元测试(vitest)配置 ``` -## 如何设置以及启动项目 - -### 安装依赖 +### 后端:aspnet-core 与配套目录 ```bash -yarn install +. +├── aspnet-core/ +│ ├── services/ # 各服务宿主(含 Dockerfile) +│ │ ├── LINGYUN.Abp.MicroService.AuthServer/ # 认证服务(STS,44385) +│ │ ├── LINGYUN.Abp.MicroService.IdentityService/ # 身份服务(30015) +│ │ ├── LINGYUN.Abp.MicroService.AdminService/ # 管理服务(30010) +│ │ ├── LINGYUN.Abp.MicroService.LocalizationService/# 本地化服务(30030) +│ │ ├── LINGYUN.Abp.MicroService.PlatformService/ # 平台服务(30025) +│ │ ├── LINGYUN.Abp.MicroService.MessageService/ # 消息服务(30020) +│ │ ├── LINGYUN.Abp.MicroService.TaskService/ # 任务服务(30040) +│ │ ├── LINGYUN.Abp.MicroService.WebhookService/ # Webhook 服务(30045) +│ │ ├── LINGYUN.Abp.MicroService.WorkflowService/ # 工作流服务(30050) +│ │ ├── LINGYUN.Abp.MicroService.WeChatService/ # 微信服务(30060) +│ │ ├── LINGYUN.Abp.MicroService.AIService/ # AI 服务(30070) +│ │ ├── LY.MicroService.Applications.Single/ # 单体应用(30000,合并网关与全部模块) +│ │ ├── LY.MicroService.IdentityServer/ # IdentityServer 版本服务与宿主 +│ │ ├── LINGYUN.Abp.Applications/ LY.AIO.Applications.Single/ # 其它宿主 +│ │ └── Publish/ # 发布输出目录(容器镜像构建使用) +│ ├── modules/ # 业务模块,每个模块按 DDD 分层(Domain / Application / EntityFrameworkCore / HttpApi ...) +│ │ ├── account/ # 账户与登录(含 OpenIddict/IdentityServer 的 Web 集成、验证码) +│ │ ├── identity/ # 用户、角色、组织机构、会话、登录日志 +│ │ ├── identityServer/ # IdentityServer4 相关实现 +│ │ ├── openIddict/ # OpenIddict 服务端(应用、作用域、令牌、Portal、二维码、短信、微信登录) +│ │ ├── permissions-management/ # 权限管理与授权 +│ │ ├── saas/ # 多租户与版本 +│ │ ├── settings/ feature-management/ # 设置、特性管理 +│ │ ├── localization-management/ text-templating/ # 本地化、文本模板 +│ │ ├── auditing/ data-protection/ gdpr/ captcha/ # 审计、数据保护、GDPR、验证码 +│ │ ├── blob-management/ caching-management/ # 对象存储、缓存管理 +│ │ ├── platform/ project/ system-info/ demo/ # 平台、项目、系统信息、示例 +│ │ ├── realtime-message/ realtime-notifications/ # 即时消息、实时通知 +│ │ ├── task-management/ rules-management/ webhooks/ # 后台任务、规则引擎、Webhook +│ │ ├── ai/ elsa/ # AI 能力、工作流(Elsa) +│ ├── framework/ # 基础框架包(33 个分组),常用分组: +│ │ ├── common/ core 相关基础包(LINGYUN.Abp.Core、CAP、Hangfire、BlobStoring、SignalR ...) +│ │ ├── security/ authentication/ authorization/ # 安全、登录方式、授权 +│ │ ├── auditing/ logging/ telemetry/ # 审计、日志、链路追踪(OpenTelemetry/SkyWalking) +│ │ ├── multi-tenancy 相关:tenants/ # 多租户与版本 +│ │ ├── wechat/ wx-pusher/ pushplus/ tui-juhe/ # 微信、消息推送 +│ │ ├── cloud-aliyun/ cloud-tencent/ # 阿里云、腾讯云集成 +│ │ ├── dapr/ elasticsearch/ efcore/ data-protection/ # Dapr、ES、EF Core、数据保护 +│ │ ├── dynamic-queryable/ dynamic-definition/ exporter/ # 动态查询、动态定义、导入导出 +│ │ ├── localization/ settings/ features/ mvc/ open-api/ cli/ ... # 其它基础包 +│ ├── migrations/ # 各服务的 DbMigrator 与 EntityFrameworkCore 迁移项目(deploy.ps1 会依次执行) +│ ├── aspire/ # .NET Aspire:LINGYUN.Abp.MicroService.AppHost 及各服务的 Aspire 宿主 +│ ├── templates/ # dotnet new 项目模板(micro 微服务 / aio 单体) +│ ├── tests/ # 单元测试项目 +│ ├── LINGYUN.MicroService.All.slnx # 全量解决方案 +│ ├── LINGYUN.MicroService.Aspire.slnx # Aspire 解决方案 +│ └── LINGYUN.MicroService.SingleProject.slnx # 单体解决方案 +├── gateways/ +│ ├── internal/ # 内部网关(YARP):Internal.Gateway / OpenApi.Gateway + yarp*.json 路由 +│ └── web/ # Web 网关:LY.MicroService.ApiGateway +├── apps/ # 前端:vben5(当前)/ vue(旧版) +├── build/ # 构建与迁移脚本:build-aspnetcore-ef-update.ps1、build-aspnetcore-docker-build.ps1 ... +├── deploy/ # 一键部署脚本(deploy.ps1)、中间件数据与各服务日志目录 +├── docs/ # 文档(单体服务启动指南等) +├── docker-compose.yml # 后端服务编排 +├── docker-compose.override.yml # 镜像标签、卷映射与启动顺序 +├── docker-compose.override.configuration.yml # 各服务环境变量(连接串、CAP、Redis、Elasticsearch 等) +├── docker-compose.middleware.yml # 中间件:MySQL/Redis/RabbitMQ/Elasticsearch/Kibana/Logstash/OpenObserve +├── docker-compose.override.agile.yml # AgileConfig 配置中心(可选) +├── Directory.Build.props Directory.Packages.props NuGet.Config common.props # 统一构建与包版本管理 +└── README.md README.en.md RELEASE.md LICENSE # 文档与许可 ``` -### 更改配置文件 - - -修改开发环境用于代理的服务器地址,以下提供了三个分别为IdentityServer、SignalR、ApiService地址 -如果自己变更了端口,需要改成自己的地址 +## 启动项目 -```bash +本项目提供三种启动方式,按需选择: -VITE_PROXY = [["/connect","http://127.0.0.1:44385"],["/api","http://127.0.0.1:30000"],["/signalr-hubs","ws://127.0.0.1:30000"]] +| 方式 | 说明 | 中间件 | 前端 | +| --- | --- | --- | --- | +| 方式一:微服务 | 完整微服务架构,后端全部以容器运行 | 需**先启动** `docker-compose.middleware.yml` | 单独启动 vben5 | +| 方式二:Aspire | AppHost 编排本地微服务开发环境 | AppHost 自动创建容器(PostgreSQL/Redis/RabbitMQ/Elasticsearch/Kibana) | AppHost 自动启动 | +| 方式三:单体 | 网关、认证与业务模块合并为一个进程 | 需**先启动** `docker-compose.middleware.yml` | 单独启动 vben5 | -``` +### 通用前提 -修改生产环境真实地址,如上 +- **.NET SDK 10**(`dotnet --version`) +- **Docker / Docker Compose**(方式一、三的中间件;方式二的中间件容器同样由 Docker 提供) +- **Node.js 20+ 与 pnpm**(前端位于 `apps/vben5`,为 pnpm monorepo,`preinstall` 会执行 `only-allow pnpm`) +- **hosts**:Windows 修改 `C:\Windows\System32\drivers\etc\hosts`,Linux 修改 `/etc/hosts`,增加如下配置 + ``` + 127.0.0.1 host.docker.internal + ``` + (容器内通过 `extra_hosts: host.docker.internal:host-gateway` 访问宿主机上的中间件) -```bash +--- -# STS Connect -# token签发地址 -VITE_GLOB_AUTHORITY='http://127.0.0.1:44385' -# 客户端标识 -VITE_GLOB_CLIENT_ID='vue-admin-element' -# 客户端密钥 -VITE_GLOB_CLIENT_SECRET='1q2w3e*' +### 方式一:微服务启动 +#### 1) 一键启动:deploy/deploy.ps1 +```powershell +cd ./deploy +powershell -ExecutionPolicy Bypass -File .\deploy.ps1 ``` -### EntityFramework 迁移 +脚本依次完成(见 `deploy/deploy.ps1`): -请切换到服务项目启动目录, 执行 **dotnet ef** 命令进行数据库迁移 +1. 启动中间件:`docker-compose -f .\docker-compose.middleware.yml -p labp up -d --build`(MySQL、Redis、RabbitMQ、Elasticsearch、Kibana、Logstash、OpenObserve) +2. 等待 30 秒,等 MySQL 初始化完成 +3. 依次执行 8 个数据库迁移项目(`dotnet run --no-build`,**因此执行脚本前必须先构建过后端**) +4. 构建 12 个后端镜像(`labp-*-service:10.6.0`) +5. 启动后端:`docker-compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.override.configuration.yml -p labp up -d` +6. 在 `apps/vben5` 下执行 `pnpm dev:app` 启动前端 -例如: -``` shell +注意: -cd aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host +- 必须在 **deploy 目录**下执行脚本(脚本内部使用相对路径)。 +- 脚本调用的是 `docker-compose`(Compose V1 命令);本机只安装 Compose V2 插件时,请把脚本中的 `docker-compose` 改为 `docker compose`。 +- 脚本不包含 AgileConfig(`docker-compose.override.agile.yml`),配置均来自 `docker-compose.override.configuration.yml`。 -dotnet ef database update - -``` - -- 也可以使用快速迁移脚本文件: **./build/build-aspnetcore-ef-update.ps1** +#### 2) 手动启动(与脚本等价,务必先启动中间件) +```powershell +# ① 启动中间件(务必先启动) +docker-compose -f .\docker-compose.middleware.yml -p labp up -d +# 首次启动请等待 30 秒以上,让 MySQL 执行 deploy/mysql/docker-entrypoint-initdb.d 下的初始化脚本 -### 配置RabbitMQ +# ② 数据库迁移:使用迁移脚本(内部对 aspnet-core/migrations 下的 8 个 *.DbMigrator 依次执行 dotnet run,会自动构建) +cd .\build +.\build-aspnetcore-ef-update.ps1 -因此项目设计为微服务架构,服务间通讯采用分布式事件的方式,项目采用的是[DotNetCore/CAP](https://github.com/dotnetcore/CAP) -通讯方式为**RabbitMQ Server**,所以您需要事先安装**RabbitMQ**,具体安装方式请查阅官网 +# ③ 构建后端镜像:生成 12 个 labp-*-service:10.6.0(标签必须与 docker-compose.override.yml 中的 image 一致) +.\build-aspnetcore-docker-build.ps1 -然后您需要更改配置文件中的**CAP:RabbitMQ**配置项,设置为您自己定义的配置,推荐使用**rabbitmq_management**插件便于快速管理**RabbitMQ** +# ④ 启动后端(三个 compose 文件缺一不可) +docker-compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.override.configuration.yml -p labp up -d +# ⑤ 启动前端 +cd .\apps\vben5 +pnpm install +pnpm dev:app +``` -### 启动后台服务 - -```shell -cd aspnet-core/services +手动步骤说明: -start-all-service.bat +- ②③ 两个脚本都必须在 **build 目录**下执行(脚本内部相对引用 `./build-aspnetcore-common.ps1`)。 +- `build-aspnetcore-ef-update.ps1` 内部使用 `dotnet run`(会先构建再运行),因此手动流程**不需要**预先构建后端;而一键脚本 `deploy.ps1` 使用 `dotnet run --no-build`,所以走一键脚本前必须先构建过后端。 +- 只想迁移某个服务时,可直接进入对应目录执行,例如: + ```powershell + cd .\aspnet-core\migrations\LINGYUN.Abp.MicroService.AuthServer.DbMigrator + dotnet run + ``` + +#### 3) 访问地址 + +| 组件 | 地址 | +| --- | --- | +| 前端(vben5,`@abp/app-antd`) | http://localhost:5666 | +| API 网关 | http://localhost:30000 | +| 认证服务(STS) | http://localhost:44385 | +| 身份 / 管理 / 平台 / 消息 / 本地化 | 30015 / 30010 / 30025 / 30020 / 30030 | +| 任务 / Webhook / 工作流 / 微信 / AI | 30040 / 30045 / 30050 / 30060 / 30070 | +| Kibana | http://localhost:5601 | +| RabbitMQ 管理台 | http://localhost:15672 (admin / 123456) | +| MySQL | localhost:3306 (root / 123456,数据库 `abp`) | +| Redis | localhost:6379 | +| OpenObserve 管理台 | http://localhost:5080 (admin@abp.io / ww1Z5L%6) | + +### 方式二:Aspire 启动 + +AppHost 会自动拉起它自己的中间件容器(PostgreSQL、Redis、RabbitMQ、Elasticsearch、Kibana),在 Development 环境下自动执行各服务的数据库迁移项目,并自动以 `pnpm dev:app` 启动 vben5 前端,**不需要**再启动 `docker-compose.middleware.yml`。 + +```powershell +cd ./aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost +aspire run ``` -### 启动本地开发环境 - -```shell +- 需要安装 Aspire CLI(版本需与 AppHost 的 `Aspire.AppHost.Sdk` 13.x 匹配):`dotnet tool install --global Aspire.Cli`;不使用 CLI 时也可以直接 `dotnet run --project .\LINGYUN.Abp.MicroService.AppHost.csproj`。 +- 需要 Docker 处于运行状态,且 `apps/vben5` 已经执行过 `pnpm install`(AppHost 会运行 `pnpm dev:app`,前端端口固定 5666)。 +- 启动后终端会输出 Aspire Dashboard 地址,可在面板中查看资源状态、日志与链路。 +- AppHost 占用的宿主机端口与方式一的中间件完全重叠(6379/9200/5601/5672/15672/5432 等),**请勿与方式一的中间件同时运行**。 -cd apps/vue +### 方式三:单体服务启动 -yarn dev +单体服务把网关、认证与各业务模块合并到一个进程,但**仍然依赖中间件,必须先启动中间件**: -``` +```powershell +# ① 启动中间件 +docker-compose -f .\docker-compose.middleware.yml -p labp up -d +# 首次启动请等待 30 秒以上 -### 构建生产环境 +# ② 启动单体服务 +cd .\aspnet-core\services\LY.MicroService.Applications.Single +dotnet run --launch-profile Single.MySql.Dev -```bash -yarn build +# ③ 启动前端 +cd .\apps\vben5 +pnpm install +pnpm dev:app ``` -### 关于docker容器部署 +- 默认地址 **http://localhost:30000**:`App:SelfUrl` 与 `AuthServer:Authority` 均指向它,认证端点与 API 同端口。 +- **建议显式指定 Profile**:不指定时 `dotnet run` 使用 `launchSettings.json` 中的第一个 Profile(当前为 `Single.PostgreSql.Dev`)。使用默认数据库(MySQL)请用 `Single.MySql.Dev`,其它可选 `Single.PostgreSql.Dev`、`Single.SqlServer.Dev`。 +- 各数据库连接串见 `appsettings.Development.MySql.json` / `appsettings.Development.PostgreSql.json` / `appsettings.Development.SqlServer.json`。 -**第一步**: 构建后台服务, powershell脚本:**./build/build-aspnetcore-release.ps1**, **注意:发布后的服务需要 appsettings.Production.json 文件** +### 常见问题 -**第二步**: 构建前端, **./build/build-vue-apps.ps1** +- **`docker-compose` 命令不存在**:脚本使用的是 Compose V1 命令;仅安装 Compose V2 时请改用 `docker compose`。 +- **提示找不到镜像 `labp-*-service:10.6.0`**:`docker-compose.override.yml` 通过 `image:` 引用预构建镜像,请先执行 `build/build-aspnetcore-docker-build.ps1`(方式一·手动启动 步骤 ③)。 +- **一键脚本迁移报错(`dotnet run --no-build`)**:`deploy.ps1` 内部使用 `--no-build`,执行脚本前需先构建后端(`dotnet build .\aspnet-core\LINGYUN.MicroService.All.slnx`);手动迁移请改用 **build/build-aspnetcore-ef-update.ps1**(内部 `dotnet run`,会自动构建)。 +- **前端依赖安装失败**:`apps/vben5` 强制使用 pnpm(`preinstall` 会执行 `only-allow pnpm`),请使用 `pnpm install` / `pnpm dev:app`。 +- **容器内连不上宿主机中间件**:确认 hosts 文件包含 `127.0.0.1 host.docker.internal`。 -**第三步**: 构建后的发布地址默认在**cd ./aspnet-core/services/Publish** ,变更nginx代理服务器地址: **./client/docker/nginx/default.conf** +--- -**第四步**: 运行此命令 **sudo docker-compose down && sudo docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build -d** +### 代码格式检查以及自动修复 -**推荐使用 jenkins 之类的ci工具,可以将此简化为一个步骤** +在 `apps/vben5` 下执行(vben5 强制使用 pnpm): +```bash +cd apps/vben5 -### 代码格式检查以及自动修复 +# 代码检查 +pnpm lint -```bash -yarn lint:eslint +# 自动修复 +pnpm format + +# 类型检查 +pnpm check:type ``` ### 运行单元测试 ```bash -yarn test:unit +cd apps/vben5 + +pnpm test:unit ``` ## 如何贡献 diff --git a/apps/vben5/packages/@abp/notifications/src/components/send-records/NotificationSendRecordTable.vue b/apps/vben5/packages/@abp/notifications/src/components/send-records/NotificationSendRecordTable.vue index 275f0b0fe..e1b3d3136 100644 --- a/apps/vben5/packages/@abp/notifications/src/components/send-records/NotificationSendRecordTable.vue +++ b/apps/vben5/packages/@abp/notifications/src/components/send-records/NotificationSendRecordTable.vue @@ -119,7 +119,7 @@ const formOptions: VbenFormProps = { ], }, fieldName: 'state', - label: $t('WebhooksManagement.DisplayName:State'), + label: $t('Notifications.DisplayName:SendState'), }, { component: 'ApiSelect', diff --git a/aspnet-core/LINGYUN.MicroService.All.slnx b/aspnet-core/LINGYUN.MicroService.All.slnx index e519b3174..1f00450ab 100644 --- a/aspnet-core/LINGYUN.MicroService.All.slnx +++ b/aspnet-core/LINGYUN.MicroService.All.slnx @@ -27,63 +27,70 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + @@ -307,6 +314,21 @@ + + + + + + + + + + + + + + + @@ -383,6 +405,7 @@ + diff --git a/aspnet-core/cleanup-logs.bat b/aspnet-core/cleanup-logs.bat index 5140f0035..77f00d751 100644 --- a/aspnet-core/cleanup-logs.bat +++ b/aspnet-core/cleanup-logs.bat @@ -18,16 +18,15 @@ del .\aspire\LINGYUN.Abp.MicroService.WeChatService\Logs /Q del .\aspire\LINGYUN.Abp.MicroService.WorkflowService\Logs /Q del .\services\LY.MicroService.Applications.Single\Logs /Q -del .\services\LY.MicroService.BackendAdmin.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.AuthServer\Logs /Q -del .\services\LY.MicroService.AuthServer.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.identityServer\Logs /Q -del .\services\LY.MicroService.identityServer.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.LocalizationManagement.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.PlatformManagement.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.RealtimeMessage.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.TaskManagement.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.WebhooksManagement.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.WechatManagement.HttpApi.Host\Logs /Q -del .\services\LY.MicroService.WorkflowManagement.HttpApi.Host\Logs /Q +del .\services\LINGYUN.Abp.MicroService.LocalizationService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.AuthServer\Logs /Q +del .\services\LINGYUN.Abp.MicroService.AdminService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.IdentityService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.PlatformService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.TaskService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.MessageService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.WebhookService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.WeChatService\Logs /Q +del .\services\LINGYUN.Abp.MicroService.WorkflowService\Logs /Q + diff --git a/aspnet-core/create-database.bat b/aspnet-core/create-database.bat deleted file mode 100644 index 32fb1efa0..000000000 --- a/aspnet-core/create-database.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off -cls - -call .\migrate-db-cmd.bat LY.MicroService.Platform.EntityFrameworkCore platform --ef-u -call .\migrate-db-cmd.bat LY.MicroService.BackendAdmin.EntityFrameworkCore admin --ef-u -call .\migrate-db-cmd.bat LY.MicroService.AuthServer.EntityFrameworkCore auth-server --ef-u -call .\migrate-db-cmd.bat LY.MicroService.IdentityServer.EntityFrameworkCore identityserver4-admin --ef-u -call .\migrate-db-cmd.bat LY.MicroService.LocalizationManagement.EntityFrameworkCore localization --ef-u -call .\migrate-db-cmd.bat LY.MicroService.RealtimeMessage.EntityFrameworkCore messages --ef-u -call .\migrate-db-cmd.bat LY.MicroService.TaskManagement.EntityFrameworkCore task-management --ef-u -call .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.EntityFrameworkCore webhooks-management --ef-u - -taskkill /IM dotnet.exe /F \ No newline at end of file diff --git a/aspnet-core/delete-bin-obj.bat b/aspnet-core/delete-bin-obj.bat new file mode 100644 index 000000000..5430432b6 --- /dev/null +++ b/aspnet-core/delete-bin-obj.bat @@ -0,0 +1,18 @@ +@echo off +setlocal enabledelayedexpansion + +cls +echo Deleting all BIN and OBJ folders... + +for /f "delims=" %%D in ('dir /s /b /ad bin obj 2^>nul') do ( + echo %%D | findstr /i "\\node_modules\\" >nul + if errorlevel 1 ( + echo Deleting: %%D + rd /s /q "%%D" + ) else ( + echo Skipping: %%D + ) +) + +echo BIN and OBJ folders have been successfully deleted. +endlocal \ No newline at end of file diff --git a/aspnet-core/ef-update.ps1 b/aspnet-core/ef-update.ps1 deleted file mode 100644 index 4be3108f9..000000000 --- a/aspnet-core/ef-update.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -Set-Location ".\migrations\LY.MicroService.BackendAdmin.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.Platform.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.LocalizationManagement.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.RealtimeMessage.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.IdentityServer.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.TaskManagement.EntityFrameworkCore" -dotnet ef database update - -Set-Location "..\LY.MicroService.AuthServer.EntityFrameworkCore" -dotnet ef database update diff --git a/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/LocalizableValue.cs b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/LocalizableValue.cs new file mode 100644 index 000000000..bced7592f --- /dev/null +++ b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/LocalizableValue.cs @@ -0,0 +1,25 @@ +using System; + +namespace Volo.Abp.Settings; + +[Serializable] +public class LocalizableValue +{ + public string ResourceName { get; set; } = default!; + + public string Name { get; set; } = default!; + + public TValue Value { get; set; } = default!; + + public LocalizableValue() + { + + } + + public LocalizableValue(string resourceName, string name, TValue value) + { + ResourceName = resourceName; + Name = name; + Value = value; + } +} diff --git a/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingDefinitionExtensions.cs b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingDefinitionExtensions.cs index f7e3f6165..ff50517a9 100644 --- a/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingDefinitionExtensions.cs +++ b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingDefinitionExtensions.cs @@ -192,6 +192,19 @@ public static class SettingDefinitionExtensions .WithProperty(OptionValueKey, optionValues); } + public static SettingDefinition WithOptions( + this SettingDefinition definition, + IEnumerable> options) + { + var optionNames = options.Select(x => $"N:{x.Name};L:{x.ResourceName}").JoinAsString(","); + var optionValues = options.Select(x => x.Value).JoinAsString(","); + + return definition + .WithValueType(ValueType.Option) + .WithProperty(OptionNameKey, optionNames) + .WithProperty(OptionValueKey, optionValues); + } + public static SettingDefinition ReplaceProviders( this SettingDefinition definition, params string[] providers) diff --git a/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingResourceDefinition.cs b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingResourceDefinition.cs index e3285b588..7bc314bc8 100644 --- a/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingResourceDefinition.cs +++ b/aspnet-core/framework/settings/LINGYUN.Abp.Settings/Volo/Abp/Settings/SettingResourceDefinition.cs @@ -53,7 +53,7 @@ public class SettingResourceDefinition { if (!string.IsNullOrWhiteSpace(ResourceType)) { - return new LocalizableString(DisplayName!, ResourceType).Localize(stringLocalizerFactory); + return new LocalizableString(Type.GetType(ResourceType)!, DisplayName!).Localize(stringLocalizerFactory); } return new LocalizableString(DisplayName!, ResourceName).Localize(stringLocalizerFactory); } diff --git a/aspnet-core/migrate-database.bat b/aspnet-core/migrate-database.bat deleted file mode 100644 index 68b63f138..000000000 --- a/aspnet-core/migrate-database.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -cls - -call .\migrate-db-cmd.bat LY.MicroService.AuthServer.DbMigrator auth-server --run -call .\migrate-db-cmd.bat LY.MicroService.Platform.DbMigrator platform --run -call .\migrate-db-cmd.bat LY.MicroService.LocalizationManagement.DbMigrator localization --run -call .\migrate-db-cmd.bat LY.MicroService.RealtimeMessage.DbMigrator messages --run -call .\migrate-db-cmd.bat LY.MicroService.TaskManagement.DbMigrator task-management --run -call .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.DbMigrator webhooks-management --run -call .\migrate-db-cmd.bat LY.MicroService.BackendAdmin.DbMigrator admin --run - -taskkill /IM dotnet.exe /F \ No newline at end of file diff --git a/aspnet-core/migrate-db-cmd.bat b/aspnet-core/migrate-db-cmd.bat deleted file mode 100644 index fad3e03ad..000000000 --- a/aspnet-core/migrate-db-cmd.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off -chcp 65001 - -title %2 - -@echo %2 migrating - -cd .\migrations\%1 - -if '%3' equ '--run' goto run -if '%3' equ '--restore' goto restore -if '%3' equ '--ef-u' goto efu -if '%3' equ '' goto run -exit - -:run -start cmd.exe /c dotnet run --no-build -goto end - -:restore -dotnet restore -goto end - -:efu -dotnet ef database update -goto end - -:end -cd ..\..\ -@echo %2 migrated -@echo -------- diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..8e4e025c5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorHostedService.cs @@ -0,0 +1,54 @@ +using LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.AIService.DbMigrator; + +public class AIServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public AIServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorModule.cs new file mode 100644 index 000000000..ea4131ac8 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/AIServiceDbMigratorModule.cs @@ -0,0 +1,14 @@ +using LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.AIService.DbMigrator; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(AIServiceMigrationsEntityFrameworkCoreModule) + )] +public class AIServiceDbMigratorModule : AbpModule +{ + +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/LINGYUN.Abp.MicroService.AIService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/LINGYUN.Abp.MicroService.AIService.DbMigrator.csproj new file mode 100644 index 000000000..e5cdabb81 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/LINGYUN.Abp.MicroService.AIService.DbMigrator.csproj @@ -0,0 +1,32 @@ + + + + + + Exe + net10.0 + enable + false + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/Program.cs new file mode 100644 index 000000000..0c7170238 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/Program.cs @@ -0,0 +1,43 @@ +using LINGYUN.Abp.MicroService.AIService.DbMigrator; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; +using System; + +var defaultOutputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"; + +Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AIService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AIService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Async(x => x.Console(outputTemplate: defaultOutputTemplate)) + .WriteTo.Async(x => x.File("Logs/migrations.txt", outputTemplate: defaultOutputTemplate)) + .CreateLogger(); + +try +{ + var builder = Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + await builder.RunConsoleAsync(); +} +catch (Exception ex) +{ + Log.Fatal(ex, "Host terminated unexpectedly!"); +} +finally +{ + await Log.CloseAndFlushAsync(); +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDataSeeder.cs new file mode 100644 index 000000000..9b5639dec --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDataSeeder.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +public class AIServiceDataSeeder : ITransientDependency +{ + protected ILogger Logger { get; } + protected ICurrentTenant CurrentTenant { get; } + + public AIServiceDataSeeder( + ICurrentTenant currentTenant) + { + CurrentTenant = currentTenant; + + Logger = NullLogger.Instance; + } + + public virtual Task SeedAsync(DataSeedContext context) + { + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..6d643ad4b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationEventHandler.cs @@ -0,0 +1,45 @@ +using Microsoft.Extensions.Logging; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +public class AIServiceDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + protected AIServiceDataSeeder DataSeeder { get; } + + public AIServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + AIServiceDataSeeder dataSeeder) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + // 新租户数据种子 + var context = new DataSeedContext(eventData.Id); + if (eventData.Properties != null) + { + foreach (var property in eventData.Properties) + { + context.WithProperty(property.Key, property.Value); + } + } + + await DataSeeder.SeedAsync(context); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationService.cs new file mode 100644 index 000000000..1576c8483 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceDbMigrationService.cs @@ -0,0 +1,37 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +public class AIServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + protected AIServiceDataSeeder DataSeeder { get; } + public AIServiceDbMigrationService( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + AIServiceDataSeeder dataSeeder) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task SeedAsync() + { + // DbMigrator迁移数据种子 + await DataSeeder.SeedAsync(new DataSeedContext()); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContext.cs new file mode 100644 index 000000000..5ab0b83b4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContext.cs @@ -0,0 +1,35 @@ +using LINGYUN.Abp.AIManagement.Chats; +using LINGYUN.Abp.AIManagement.EntityFrameworkCore; +using LINGYUN.Abp.AIManagement.Tokens; +using LINGYUN.Abp.AIManagement.Tools; +using LINGYUN.Abp.AIManagement.Workspaces; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +[ConnectionStringName("AIServiceDbMigrator")] +public class AIServiceMigrationsDbContext : + AbpDbContext, + IAIManagementDbContext +{ + public DbSet WorkspaceDefinitions { get; set; } + public DbSet AIToolDefinitions { get; set; } + public DbSet TextChatMessageRecords { get; set; } + public DbSet ConversationRecords { get; set; } + public DbSet TokenUsageRecords { get; set; } + + public AIServiceMigrationsDbContext( + DbContextOptions options) : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureAIManagement(); + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..fab946579 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +public class AIServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public AIServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new AIServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.AIService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..e3a29ef4c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/AIServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,44 @@ +using LINGYUN.Abp.AIManagement.EntityFrameworkCore; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpAIManagementEntityFrameworkCoreModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class AIServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..babc34cd0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.csproj @@ -0,0 +1,34 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.Designer.cs new file mode 100644 index 000000000..4e09aaf44 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.Designer.cs @@ -0,0 +1,383 @@ +// +using System; +using LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AIServiceMigrationsDbContext))] + [Migration("20261007004411_Initial-AI-Service")] + partial class InitialAIService + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.9") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Chats.ConversationRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExpiredAt") + .HasColumnType("datetime(6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdateAt") + .HasColumnType("datetime(6)"); + + b.Property("Workspace") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("AbpAIConversations", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Chats.TextChatMessageRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("ConversationId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ReplyAt") + .HasColumnType("datetime(6)"); + + b.Property("ReplyMessage") + .HasColumnType("longtext"); + + b.Property("Role") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("Workspace") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ConversationId"); + + b.ToTable("AbpAITextChatMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Tokens.TokenUsageRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CachedInputTokenCount") + .HasColumnType("bigint"); + + b.Property("ConversationId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("InputTokenCount") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("OutputTokenCount") + .HasColumnType("bigint"); + + b.Property("ReasoningTokenCount") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TotalTokenCount") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ConversationId"); + + b.ToTable("AbpAITokenUsages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Tools.AIToolDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("IsGlobal") + .HasColumnType("tinyint(1)"); + + b.Property("IsSystem") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpAIAIToolDefinitionRecords", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Workspaces.WorkspaceDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApiBaseUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ApiKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrequencyPenalty") + .HasColumnType("float"); + + b.Property("Instructions") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("IsSystem") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxOutputTokens") + .HasColumnType("int"); + + b.Property("ModelName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("PresencePenalty") + .HasColumnType("float"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SystemPrompt") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Temperature") + .HasColumnType("float"); + + b.Property("Tools") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpAIWorkspaceDefinitions", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.cs new file mode 100644 index 000000000..10652875c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/20261007004411_Initial-AI-Service.cs @@ -0,0 +1,219 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialAIService : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAIAIToolDefinitionRecords", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + IsSystem = table.Column(type: "tinyint(1)", nullable: false), + IsGlobal = table.Column(type: "tinyint(1)", nullable: false), + StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAIAIToolDefinitionRecords", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAIConversations", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Workspace = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false), + ExpiredAt = table.Column(type: "datetime(6)", nullable: false), + UpdateAt = table.Column(type: "datetime(6)", nullable: true), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAIConversations", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAITextChatMessages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Content = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Workspace = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Role = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false), + UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ConversationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ReplyMessage = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ReplyAt = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAITextChatMessages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAITokenUsages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MessageId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ConversationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + InputTokenCount = table.Column(type: "bigint", nullable: true), + OutputTokenCount = table.Column(type: "bigint", nullable: true), + TotalTokenCount = table.Column(type: "bigint", nullable: true), + CachedInputTokenCount = table.Column(type: "bigint", nullable: true), + ReasoningTokenCount = table.Column(type: "bigint", nullable: true), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAITokenUsages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAIWorkspaceDefinitions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ModelName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ApiKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ApiBaseUrl = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SystemPrompt = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Instructions = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Temperature = table.Column(type: "float", nullable: true), + MaxOutputTokens = table.Column(type: "int", nullable: true), + FrequencyPenalty = table.Column(type: "float", nullable: true), + PresencePenalty = table.Column(type: "float", nullable: true), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + IsSystem = table.Column(type: "tinyint(1)", nullable: false), + Tools = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAIWorkspaceDefinitions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAIAIToolDefinitionRecords_Name", + table: "AbpAIAIToolDefinitionRecords", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpAITextChatMessages_TenantId_ConversationId", + table: "AbpAITextChatMessages", + columns: new[] { "TenantId", "ConversationId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAITokenUsages_TenantId_ConversationId", + table: "AbpAITokenUsages", + columns: new[] { "TenantId", "ConversationId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAIWorkspaceDefinitions_Name", + table: "AbpAIWorkspaceDefinitions", + column: "Name", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAIAIToolDefinitionRecords"); + + migrationBuilder.DropTable( + name: "AbpAIConversations"); + + migrationBuilder.DropTable( + name: "AbpAITextChatMessages"); + + migrationBuilder.DropTable( + name: "AbpAITokenUsages"); + + migrationBuilder.DropTable( + name: "AbpAIWorkspaceDefinitions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/AIServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/AIServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..fae89d279 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/Migrations/AIServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,380 @@ +// +using System; +using LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AIServiceMigrationsDbContext))] + partial class AIServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.9") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Chats.ConversationRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExpiredAt") + .HasColumnType("datetime(6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdateAt") + .HasColumnType("datetime(6)"); + + b.Property("Workspace") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("AbpAIConversations", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Chats.TextChatMessageRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("ConversationId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ReplyAt") + .HasColumnType("datetime(6)"); + + b.Property("ReplyMessage") + .HasColumnType("longtext"); + + b.Property("Role") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("Workspace") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ConversationId"); + + b.ToTable("AbpAITextChatMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Tokens.TokenUsageRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CachedInputTokenCount") + .HasColumnType("bigint"); + + b.Property("ConversationId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("InputTokenCount") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("OutputTokenCount") + .HasColumnType("bigint"); + + b.Property("ReasoningTokenCount") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TotalTokenCount") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ConversationId"); + + b.ToTable("AbpAITokenUsages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Tools.AIToolDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("IsGlobal") + .HasColumnType("tinyint(1)"); + + b.Property("IsSystem") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpAIAIToolDefinitionRecords", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.AIManagement.Workspaces.WorkspaceDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApiBaseUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ApiKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrequencyPenalty") + .HasColumnType("float"); + + b.Property("Instructions") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("IsSystem") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxOutputTokens") + .HasColumnType("int"); + + b.Property("ModelName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("PresencePenalty") + .HasColumnType("float"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SystemPrompt") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Temperature") + .HasColumnType("float"); + + b.Property("Tools") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpAIWorkspaceDefinitions", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..9060dd173 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorHostedService.cs @@ -0,0 +1,55 @@ +using LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.AdminService.DbMigrator; + +public class AdminServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public AdminServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(AdminServiceDbMigratorHostedService).Assembly; + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..d9fa872c6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.AdminService.DbMigrator; +public partial class AdminServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.cs new file mode 100644 index 000000000..973aff236 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/AdminServiceDbMigratorModule.cs @@ -0,0 +1,57 @@ +using LINGYUN.Abp.Account; +using LINGYUN.Abp.Auditing; +using LINGYUN.Abp.BlobManagement; +using LINGYUN.Abp.CachingManagement; +using LINGYUN.Abp.DataProtectionManagement; +using LINGYUN.Abp.FeatureManagement; +using LINGYUN.Abp.Gdpr; +using LINGYUN.Abp.Identity; +using LINGYUN.Abp.LocalizationManagement; +using LINGYUN.Abp.MessageService; +using LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; +using LINGYUN.Abp.Notifications; +using LINGYUN.Abp.OpenIddict; +using LINGYUN.Abp.PermissionManagement; +using LINGYUN.Abp.ProjectManagement; +using LINGYUN.Abp.RulesEngineManagement; +using LINGYUN.Abp.Saas; +using LINGYUN.Abp.SettingManagement; +using LINGYUN.Abp.TaskManagement; +using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.WebhooksManagement; +using LINGYUN.Platform; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.AdminService.DbMigrator; + +[DependsOn( + typeof(AbpSettingManagementApplicationContractsModule), + typeof(AbpAccountApplicationContractsModule), + typeof(AbpAuditingApplicationContractsModule), + typeof(AbpCachingManagementApplicationContractsModule), + typeof(AbpDataProtectionManagementApplicationContractsModule), + typeof(AbpFeatureManagementApplicationContractsModule), + typeof(AbpGdprApplicationContractsModule), + typeof(AbpIdentityApplicationContractsModule), + typeof(AbpLocalizationManagementApplicationContractsModule), + typeof(AbpOpenIddictApplicationContractsModule), + typeof(AbpBlobManagementApplicationContractsModule), + typeof(AbpPermissionManagementApplicationContractsModule), + typeof(PlatformApplicationContractModule), + typeof(AbpProjectManagementApplicationContractsModule), + typeof(AbpMessageServiceApplicationContractsModule), + typeof(AbpNotificationsApplicationContractsModule), + typeof(RulesEngineManagementApplicationContractsModule), + typeof(AbpSaasApplicationContractsModule), + typeof(TaskManagementApplicationContractsModule), + typeof(AbpTextTemplatingApplicationContractsModule), + typeof(WebhooksManagementApplicationContractsModule))] + +[DependsOn( + typeof(AdminServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) + )] +public partial class AdminServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/LINGYUN.Abp.MicroService.AdminService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/LINGYUN.Abp.MicroService.AdminService.DbMigrator.csproj new file mode 100644 index 000000000..23d07662e --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/LINGYUN.Abp.MicroService.AdminService.DbMigrator.csproj @@ -0,0 +1,72 @@ + + + + + + Exe + net10.0 + enable + enable + Debug;Release + AnyCPU + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Program.cs new file mode 100644 index 000000000..6662aaf1c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.AdminService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AdminService.DbMigrator", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AdminService.DbMigrator", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..70d8066a9 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.AdminService.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.EN.md new file mode 100644 index 000000000..0264a059a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.EN.md @@ -0,0 +1,98 @@ +# LINGYUN.Abp.MicroService.AdminService.DbMigrator + +Backend Administration System Database Migration Console Application, used for executing database migrations and initializing seed data for the backend administration system. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Integrated Feature Management +* Integrated Setting Management +* Integrated Permission Management +* Integrated Localization Management +* Integrated Cache Management +* Integrated Auditing +* Integrated Text Templating +* Integrated Identity Authentication +* Integrated IdentityServer +* Integrated OpenIddict +* Integrated Platform Management +* Integrated Object Storage Management +* Integrated Notification System +* Integrated Message Service +* Integrated Task Management +* Integrated Webhooks Management + +## Module Dependencies + +```csharp +[DependsOn( + typeof(BackendAdminMigrationsEntityFrameworkCoreModule), + typeof(AbpFeatureManagementApplicationContractsModule), + typeof(AbpSettingManagementApplicationContractsModule), + typeof(AbpPermissionManagementApplicationContractsModule), + typeof(AbpLocalizationManagementApplicationContractsModule), + typeof(AbpCachingManagementApplicationContractsModule), + typeof(AbpAuditingApplicationContractsModule), + typeof(AbpTextTemplatingApplicationContractsModule), + typeof(AbpIdentityApplicationContractsModule), + typeof(AbpIdentityServerApplicationContractsModule), + typeof(AbpOpenIddictApplicationContractsModule), + typeof(PlatformApplicationContractModule), + typeof(AbpOssManagementApplicationContractsModule), + typeof(AbpNotificationsApplicationContractsModule), + typeof(AbpMessageServiceApplicationContractsModule), + typeof(TaskManagementApplicationContractsModule), + typeof(WebhooksManagementApplicationContractsModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "BackendAdminDbMigrator": "Your database connection string" + }, + "IdentityServer": { + "Clients": { + "BackendAdmin_App": { + "ClientId": "BackendAdmin_App" + } + } + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure BackendAdminDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) +* [IdentityServer4 Documentation](https://identityserver4.readthedocs.io) +* [OpenIddict Documentation](https://documentation.openiddict.com) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.md new file mode 100644 index 000000000..ca317e31d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/README.md @@ -0,0 +1,98 @@ +# LINGYUN.Abp.MicroService.AdminService.DbMigrator + +后台管理系统数据库迁移控制台应用程序,用于执行后台管理系统的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 集成特性管理功能 +* 集成设置管理功能 +* 集成权限管理功能 +* 集成本地化管理功能 +* 集成缓存管理功能 +* 集成审计日志功能 +* 集成文本模板功能 +* 集成身份认证功能 +* 集成IdentityServer功能 +* 集成OpenIddict功能 +* 集成平台管理功能 +* 集成对象存储功能 +* 集成通知系统功能 +* 集成消息服务功能 +* 集成任务管理功能 +* 集成Webhooks管理功能 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(BackendAdminMigrationsEntityFrameworkCoreModule), + typeof(AbpFeatureManagementApplicationContractsModule), + typeof(AbpSettingManagementApplicationContractsModule), + typeof(AbpPermissionManagementApplicationContractsModule), + typeof(AbpLocalizationManagementApplicationContractsModule), + typeof(AbpCachingManagementApplicationContractsModule), + typeof(AbpAuditingApplicationContractsModule), + typeof(AbpTextTemplatingApplicationContractsModule), + typeof(AbpIdentityApplicationContractsModule), + typeof(AbpIdentityServerApplicationContractsModule), + typeof(AbpOpenIddictApplicationContractsModule), + typeof(PlatformApplicationContractModule), + typeof(AbpOssManagementApplicationContractsModule), + typeof(AbpNotificationsApplicationContractsModule), + typeof(AbpMessageServiceApplicationContractsModule), + typeof(TaskManagementApplicationContractsModule), + typeof(WebhooksManagementApplicationContractsModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "BackendAdminDbMigrator": "你的数据库连接字符串" + }, + "IdentityServer": { + "Clients": { + "BackendAdmin_App": { + "ClientId": "BackendAdmin_App" + } + } + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置BackendAdminDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) +* [IdentityServer4文档](https://identityserver4.readthedocs.io) +* [OpenIddict文档](https://documentation.openiddict.com) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDataSeeder.cs new file mode 100644 index 000000000..9870b9e00 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDataSeeder.cs @@ -0,0 +1,61 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +public class AdminServiceDataSeeder : ITransientDependency +{ + protected ILogger Logger { get; } + protected ICurrentTenant CurrentTenant { get; } + protected IPermissionDefinitionManager PermissionDefinitionManager { get; } + protected IPermissionDataSeeder PermissionDataSeeder { get; } + + public AdminServiceDataSeeder( + IPermissionDefinitionManager permissionDefinitionManager, + IPermissionDataSeeder permissionDataSeeder, + ICurrentTenant currentTenant) + { + PermissionDefinitionManager = permissionDefinitionManager; + PermissionDataSeeder = permissionDataSeeder; + CurrentTenant = currentTenant; + + Logger = NullLogger.Instance; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + using (CurrentTenant.Change(context.TenantId)) + { + await SeedAdminRolePermissionsAsync(context); + } + } + + private async Task SeedAdminRolePermissionsAsync(DataSeedContext context) + { + Logger.LogInformation("Seeding the default role permissions..."); + + var multiTenancySide = CurrentTenant.GetMultiTenancySide(); + var permissionNames = (await PermissionDefinitionManager.GetPermissionsAsync()) + .Where(p => p.MultiTenancySide.HasFlag(multiTenancySide)) + .Where(p => !p.Providers.Any() || p.Providers.Contains(RolePermissionValueProvider.ProviderName)) + .Select(p => p.Name) + .ToArray(); + + await PermissionDataSeeder.SeedAsync( + RolePermissionValueProvider.ProviderName, + "admin", + permissionNames, + context?.TenantId + ); + + Logger.LogInformation("Seed default role permissions completed."); + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..a68d3cf0b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationEventHandler.cs @@ -0,0 +1,45 @@ +using Microsoft.Extensions.Logging; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +public class AdminServiceDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + protected AdminServiceDataSeeder DataSeeder { get; } + + public AdminServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + AdminServiceDataSeeder dataSeeder) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + // 新租户数据种子 + var context = new DataSeedContext(eventData.Id); + if (eventData.Properties != null) + { + foreach (var property in eventData.Properties) + { + context.WithProperty(property.Key, property.Value); + } + } + + await DataSeeder.SeedAsync(context); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationService.cs new file mode 100644 index 000000000..571cf3468 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceDbMigrationService.cs @@ -0,0 +1,38 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +public class AdminServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + protected AdminServiceDataSeeder DataSeeder { get; } + + public AdminServiceDbMigrationService( + AdminServiceDataSeeder dataSeeder, + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task SeedAsync() + { + // DbMigrator迁移数据种子 + await DataSeeder.SeedAsync(new DataSeedContext()); + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContext.cs new file mode 100644 index 000000000..882be30f6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContext.cs @@ -0,0 +1,43 @@ +using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.PermissionManagement; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +[ConnectionStringName("BackendAdminDbMigrator")] +public class AdminServiceMigrationsDbContext : AbpDbContext +{ + public AdminServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureSaas(); + modelBuilder.ConfigureTextTemplating(); + modelBuilder.ConfigureFeatureManagement(); + modelBuilder.ConfigureSettingManagement(); + modelBuilder.ConfigurePermissionManagement(); + modelBuilder.ConfigureDataProtectionManagement(); + + modelBuilder.Entity(b => + { + var maxResourceNameLength = modelBuilder.IsUsingMySQL() ? 128 : PermissionGrantConsts.MaxResourceNameLength; + var maxResourceKeyLength = modelBuilder.IsUsingMySQL() ? 128 : PermissionGrantConsts.MaxResourceKeyLength; + + b.Property(x => x.ResourceName).HasMaxLength(maxResourceNameLength).IsRequired(); + b.Property(x => x.ResourceKey).HasMaxLength(maxResourceKeyLength).IsRequired(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..3375a75cd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +public class AdminServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public AdminServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new AdminServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.AdminService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..44f3bffa0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/AdminServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,42 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.PermissionManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class AdminServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..01588ab87 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.csproj @@ -0,0 +1,34 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs new file mode 100644 index 000000000..db3f4d30f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs @@ -0,0 +1,523 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20230109083613_Initial-Backend-Admin")] + partial class InitialBackendAdmin + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs new file mode 100644 index 000000000..d18925a8a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs @@ -0,0 +1,388 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialBackendAdmin : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpEditions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEditions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpFeatureGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpFeatures", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), + IsAvailableToHost = table.Column(type: "tinyint(1)", nullable: false), + AllowedProviders = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ValueType = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatures", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpPermissionGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpPermissions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + MultiTenancySide = table.Column(type: "tinyint unsigned", nullable: false), + Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpTextTemplates", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "longtext", maxLength: 1048576, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Culture = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTextTemplates", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsActive = table.Column(type: "tinyint(1)", nullable: false), + EnableTime = table.Column(type: "datetime(6)", nullable: true), + DisableTime = table.Column(type: "datetime(6)", nullable: true), + EditionId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + table.ForeignKey( + name: "FK_AbpTenants_AbpEditions_EditionId", + column: x => x.EditionId, + principalTable: "AbpEditions", + principalColumn: "Id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEditions_DisplayName", + table: "AbpEditions", + column: "DisplayName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureGroups_Name", + table: "AbpFeatureGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_GroupName", + table: "AbpFeatures", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_Name", + table: "AbpFeatures", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGroups_Name", + table: "AbpPermissionGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_GroupName", + table: "AbpPermissions", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_EditionId", + table: "AbpTenants", + column: "EditionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_Text_Template_Name", + table: "AbpTextTemplates", + columns: new[] { "TenantId", "Name" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpFeatureGroups"); + + migrationBuilder.DropTable( + name: "AbpFeatures"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpPermissionGroups"); + + migrationBuilder.DropTable( + name: "AbpPermissions"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpTextTemplates"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpEditions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs new file mode 100644 index 000000000..58bca3210 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs @@ -0,0 +1,577 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20230304062910_Add-Text-Template-Definition")] + partial class AddTextTemplateDefinition + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs new file mode 100644 index 000000000..55fdf45f6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs @@ -0,0 +1,50 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddTextTemplateDefinition : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpTextTemplateDefinitions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsLayout = table.Column(type: "tinyint(1)", nullable: false), + Layout = table.Column(type: "varchar(60)", maxLength: 60, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsInlineLocalized = table.Column(type: "tinyint(1)", nullable: false), + DefaultCultureName = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RenderEngine = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTextTemplateDefinitions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpTextTemplateDefinitions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs new file mode 100644 index 000000000..a7b79d651 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs @@ -0,0 +1,581 @@ +// +using System; +using LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20230304083526_Add-IsStatic-Field")] + partial class AddIsStaticField + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs new file mode 100644 index 000000000..d5f761020 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddIsStaticField : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsStatic", + table: "AbpTextTemplateDefinitions", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsStatic", + table: "AbpTextTemplateDefinitions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs new file mode 100644 index 000000000..6eec1141b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs @@ -0,0 +1,586 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20230323070528_Upgrade-Abp-Framework-To-7.1.0")] + partial class UpgradeAbpFrameworkTo710 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs new file mode 100644 index 000000000..63765d5ea --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo710 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "EntityVersion", + table: "AbpTenants", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "EntityVersion", + table: "AbpEditions", + type: "int", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "EntityVersion", + table: "AbpTenants"); + + migrationBuilder.DropColumn( + name: "EntityVersion", + table: "AbpEditions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs new file mode 100644 index 000000000..ce9287e9d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs @@ -0,0 +1,646 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20231028084002_Upgrade-Abp-Framework-To-7.4.0")] + partial class UpgradeAbpFrameworkTo740 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs new file mode 100644 index 000000000..01b91e6a8 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs @@ -0,0 +1,247 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo740 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "AbpTextTemplateDefinitions", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTextTemplateDefinitions", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpTextTemplateDefinitions", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTextTemplateDefinitions", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "LocalizationResourceName", + table: "AbpTextTemplateDefinitions", + type: "varchar(64)", + maxLength: 64, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpTenants", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTenants", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpTenants", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTenants", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpEditions", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpEditions", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpEditions", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpEditions", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpSettingDefinitions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), + Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsInherited = table.Column(type: "tinyint(1)", nullable: false), + IsEncrypted = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettingDefinitions_Name", + table: "AbpSettingDefinitions", + column: "Name", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpSettingDefinitions"); + + migrationBuilder.DropColumn( + name: "LocalizationResourceName", + table: "AbpTextTemplateDefinitions"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTextTemplateDefinitions", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTextTemplateDefinitions", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTenants", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTenants", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpEditions", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpEditions", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs new file mode 100644 index 000000000..644707b83 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs @@ -0,0 +1,646 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20240218002657_Upgrade-Abp-Framework-To-8.0.3")] + partial class UpgradeAbpFrameworkTo803 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs new file mode 100644 index 000000000..c35d2efda --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs @@ -0,0 +1,70 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo803 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Providers", + table: "AbpSettingDefinitions", + type: "varchar(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(128)", + oldMaxLength: 128, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "DefaultValue", + table: "AbpSettingDefinitions", + type: "varchar(2048)", + maxLength: 2048, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256)", + oldMaxLength: 256, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Providers", + table: "AbpSettingDefinitions", + type: "varchar(128)", + maxLength: 128, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(1024)", + oldMaxLength: 1024, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "DefaultValue", + table: "AbpSettingDefinitions", + type: "varchar(256)", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(2048)", + oldMaxLength: 2048, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs new file mode 100644 index 000000000..c70b78fd4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs @@ -0,0 +1,652 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20240413021854_Upgrade-Abp-Framework-To-8-1-0")] + partial class UpgradeAbpFrameworkTo810 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs new file mode 100644 index 000000000..ffd6f7d00 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo810 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "NormalizedName", + table: "AbpTenants", + type: "varchar(64)", + maxLength: 64, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants", + column: "NormalizedName"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants"); + + migrationBuilder.DropColumn( + name: "NormalizedName", + table: "AbpTenants"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs new file mode 100644 index 000000000..581cbd085 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs @@ -0,0 +1,931 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20240515073346_Add-Data-Protected-Module")] + partial class AddDataProtectedModule + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.Property("ValueRange") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("ValueRange"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs new file mode 100644 index 000000000..7cfdb4f8e --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs @@ -0,0 +1,179 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddDataProtectedModule : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuthEntitites", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TypeFullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsAuditEnabled = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthEntitites", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAuthEntityProperties", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TypeFullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ValueRange = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + TypeInfoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthEntityProperties", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuthEntityProperties_AbpAuthEntitites_TypeInfoId", + column: x => x.TypeInfoId, + principalTable: "AbpAuthEntitites", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAuthOrganizationUnitEntityRules", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + OrgId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + OrgCode = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + Operation = table.Column(type: "int", nullable: false), + FilterGroup = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + EntityTypeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + EntityTypeFullName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthOrganizationUnitEntityRules", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuthOrganizationUnitEntityRules_AbpAuthEntitites_EntityTy~", + column: x => x.EntityTypeId, + principalTable: "AbpAuthEntitites", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAuthRoleEntityRules", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + Operation = table.Column(type: "int", nullable: false), + FilterGroup = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + EntityTypeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + EntityTypeFullName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthRoleEntityRules", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuthRoleEntityRules_AbpAuthEntitites_EntityTypeId", + column: x => x.EntityTypeId, + principalTable: "AbpAuthEntitites", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuthEntitites_TypeFullName", + table: "AbpAuthEntitites", + column: "TypeFullName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuthEntityProperties_TypeInfoId_TypeFullName", + table: "AbpAuthEntityProperties", + columns: new[] { "TypeInfoId", "TypeFullName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuthOrganizationUnitEntityRules_EntityTypeId", + table: "AbpAuthOrganizationUnitEntityRules", + column: "EntityTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuthRoleEntityRules_EntityTypeId", + table: "AbpAuthRoleEntityRules", + column: "EntityTypeId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuthEntityProperties"); + + migrationBuilder.DropTable( + name: "AbpAuthOrganizationUnitEntityRules"); + + migrationBuilder.DropTable( + name: "AbpAuthRoleEntityRules"); + + migrationBuilder.DropTable( + name: "AbpAuthEntitites"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs new file mode 100644 index 000000000..7cb368e1c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs @@ -0,0 +1,941 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20240515092715_Add-Allow-Properties")] + partial class AddAllowProperties + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.Property("ValueRange") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("ValueRange"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AllowProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AllowProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs new file mode 100644 index 000000000..177699563 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddAllowProperties : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "AllowProperties", + table: "AbpAuthRoleEntityRules", + type: "varchar(512)", + maxLength: 512, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "AllowProperties", + table: "AbpAuthOrganizationUnitEntityRules", + type: "varchar(512)", + maxLength: 512, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "AllowProperties", + table: "AbpAuthRoleEntityRules"); + + migrationBuilder.DropColumn( + name: "AllowProperties", + table: "AbpAuthOrganizationUnitEntityRules"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs new file mode 100644 index 000000000..9dec6c7dd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs @@ -0,0 +1,937 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20240527092536_Remote-Tenant-Id-With-Text-Template")] + partial class RemoteTenantIdWithTextTemplate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.Property("ValueRange") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("ValueRange"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AllowProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AllowProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs new file mode 100644 index 000000000..a0ac38725 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class RemoteTenantIdWithTextTemplate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Tenant_Text_Template_Name", + table: "AbpTextTemplates"); + + migrationBuilder.DropColumn( + name: "TenantId", + table: "AbpTextTemplates"); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_Text_Template_Name", + table: "AbpTextTemplates", + column: "Name"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Tenant_Text_Template_Name", + table: "AbpTextTemplates"); + + migrationBuilder.AddColumn( + name: "TenantId", + table: "AbpTextTemplates", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_Text_Template_Name", + table: "AbpTextTemplates", + columns: new[] { "TenantId", "Name" }); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs new file mode 100644 index 000000000..65a06b285 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs @@ -0,0 +1,1051 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20250410015324_Upgrade-Abp-Framework-To-9-1-1")] + partial class UpgradeAbpFrameworkTo911 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("PropertyInfoId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("PropertyInfoId", "Name"); + + b.ToTable("AbpAuthEntityEnums", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("JavaScriptType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("JavaScriptType"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Strategy") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("SubjectId"); + + b.Property("SubjectName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("SubjectName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuthSubjectStrategys", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") + .WithMany("Enums") + .HasForeignKey("PropertyInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PropertyInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Navigation("Enums"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs new file mode 100644 index 000000000..5576afc12 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs @@ -0,0 +1,127 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo911 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ValueRange", + table: "AbpAuthEntityProperties"); + + migrationBuilder.RenameColumn( + name: "AllowProperties", + table: "AbpAuthRoleEntityRules", + newName: "AccessedProperties"); + + migrationBuilder.RenameColumn( + name: "AllowProperties", + table: "AbpAuthOrganizationUnitEntityRules", + newName: "AccessedProperties"); + + migrationBuilder.AddColumn( + name: "JavaScriptType", + table: "AbpAuthEntityProperties", + type: "varchar(256)", + maxLength: 256, + nullable: false, + defaultValue: "") + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAuthEntityEnums", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(10)", maxLength: 10, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PropertyInfoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthEntityEnums", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuthEntityEnums_AbpAuthEntityProperties_PropertyInfoId", + column: x => x.PropertyInfoId, + principalTable: "AbpAuthEntityProperties", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpAuthSubjectStrategys", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + SubjectName = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SubjectId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Strategy = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuthSubjectStrategys", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuthEntityEnums_PropertyInfoId_Name", + table: "AbpAuthEntityEnums", + columns: new[] { "PropertyInfoId", "Name" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuthEntityEnums"); + + migrationBuilder.DropTable( + name: "AbpAuthSubjectStrategys"); + + migrationBuilder.DropColumn( + name: "JavaScriptType", + table: "AbpAuthEntityProperties"); + + migrationBuilder.RenameColumn( + name: "AccessedProperties", + table: "AbpAuthRoleEntityRules", + newName: "AllowProperties"); + + migrationBuilder.RenameColumn( + name: "AccessedProperties", + table: "AbpAuthOrganizationUnitEntityRules", + newName: "AllowProperties"); + + migrationBuilder.AddColumn( + name: "ValueRange", + table: "AbpAuthEntityProperties", + type: "varchar(512)", + maxLength: 512, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs new file mode 100644 index 000000000..d00410d18 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs @@ -0,0 +1,1101 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20260420064540_Upgrade-Abp-Framework-To-10-0-2")] + partial class UpgradeAbpFrameworkTo1002 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("PropertyInfoId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("PropertyInfoId", "Name"); + + b.ToTable("AbpAuthEntityEnums", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("JavaScriptType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("JavaScriptType"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Strategy") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("SubjectId"); + + b.Property("SubjectName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("SubjectName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuthSubjectStrategys", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("ManagementPermissionName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ResourceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("ResourceName", "Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ResourceKey") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpResourcePermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") + .WithMany("Enums") + .HasForeignKey("PropertyInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PropertyInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Navigation("Enums"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs new file mode 100644 index 000000000..69920c3c6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs @@ -0,0 +1,127 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo1002 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions"); + + migrationBuilder.AlterColumn( + name: "GroupName", + table: "AbpPermissions", + type: "varchar(128)", + maxLength: 128, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(128)", + oldMaxLength: 128) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "ManagementPermissionName", + table: "AbpPermissions", + type: "varchar(128)", + maxLength: 128, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "ResourceName", + table: "AbpPermissions", + type: "varchar(256)", + maxLength: 256, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpResourcePermissionGrants", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ResourceName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ResourceKey = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpResourcePermissionGrants", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_ResourceName_Name", + table: "AbpPermissions", + columns: new[] { "ResourceName", "Name" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", + table: "AbpResourcePermissionGrants", + columns: new[] { "TenantId", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpResourcePermissionGrants"); + + migrationBuilder.DropIndex( + name: "IX_AbpPermissions_ResourceName_Name", + table: "AbpPermissions"); + + migrationBuilder.DropColumn( + name: "ManagementPermissionName", + table: "AbpPermissions"); + + migrationBuilder.DropColumn( + name: "ResourceName", + table: "AbpPermissions"); + + migrationBuilder.UpdateData( + table: "AbpPermissions", + keyColumn: "GroupName", + keyValue: null, + column: "GroupName", + value: ""); + + migrationBuilder.AlterColumn( + name: "GroupName", + table: "AbpPermissions", + type: "varchar(128)", + maxLength: 128, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(128)", + oldMaxLength: 128, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs new file mode 100644 index 000000000..b6fb5995a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs @@ -0,0 +1,1101 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + [Migration("20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant")] + partial class FixMySqlIndexKeyTooLangForResourcePermissionGrant + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("PropertyInfoId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("PropertyInfoId", "Name"); + + b.ToTable("AbpAuthEntityEnums", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("JavaScriptType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("JavaScriptType"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Strategy") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("SubjectId"); + + b.Property("SubjectName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("SubjectName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuthSubjectStrategys", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("ManagementPermissionName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ResourceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("ResourceName", "Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ResourceKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpResourcePermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") + .WithMany("Enums") + .HasForeignKey("PropertyInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PropertyInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Navigation("Enums"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs new file mode 100644 index 000000000..b552e7e42 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs @@ -0,0 +1,86 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + /// + public partial class FixMySqlIndexKeyTooLangForResourcePermissionGrant : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", + table: "AbpResourcePermissionGrants"); + + migrationBuilder.AlterColumn( + name: "ResourceName", + table: "AbpResourcePermissionGrants", + type: "varchar(128)", + maxLength: 128, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(256)", + oldMaxLength: 256) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ResourceKey", + table: "AbpResourcePermissionGrants", + type: "varchar(128)", + maxLength: 128, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(256)", + oldMaxLength: 256) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", + table: "AbpResourcePermissionGrants", + columns: new[] { "TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", + table: "AbpResourcePermissionGrants"); + + migrationBuilder.AlterColumn( + name: "ResourceName", + table: "AbpResourcePermissionGrants", + type: "varchar(256)", + maxLength: 256, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(128)", + oldMaxLength: 128) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ResourceKey", + table: "AbpResourcePermissionGrants", + type: "varchar(256)", + maxLength: 256, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(128)", + oldMaxLength: 128) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", + table: "AbpResourcePermissionGrants", + columns: new[] { "TenantId", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, + unique: true); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/AdminServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/AdminServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..2a2e8e690 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/Migrations/AdminServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,1098 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AdminServiceMigrationsDbContext))] + partial class AdminServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("PropertyInfoId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("PropertyInfoId", "Name"); + + b.ToTable("AbpAuthEntityEnums", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("JavaScriptType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("JavaScriptType"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.Property("TypeInfoId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TypeInfoId", "TypeFullName"); + + b.ToTable("AbpAuthEntityProperties", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAuditEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("TypeFullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("TypeFullName"); + + b.HasKey("Id"); + + b.HasIndex("TypeFullName"); + + b.ToTable("AbpAuthEntitites", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("OrgCode") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("OrgCode"); + + b.Property("OrgId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessedProperties") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("AccessedProperties"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("EntityTypeFullName") + .HasColumnType("longtext"); + + b.Property("EntityTypeId") + .HasColumnType("char(36)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FilterGroup") + .HasColumnType("longtext") + .HasColumnName("FilterGroup"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Operation") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityTypeId"); + + b.ToTable("AbpAuthRoleEntityRules", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Strategy") + .HasColumnType("int"); + + b.Property("SubjectId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("SubjectId"); + + b.Property("SubjectName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("SubjectName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuthSubjectStrategys", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("ManagementPermissionName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ResourceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("ResourceName", "Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ResourceKey") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpResourcePermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") + .WithMany("Enums") + .HasForeignKey("PropertyInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PropertyInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") + .WithMany("Properties") + .HasForeignKey("TypeInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => + { + b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") + .WithMany() + .HasForeignKey("EntityTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EntityTypeInfo"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => + { + b.Navigation("Enums"); + }); + + modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => + { + b.Navigation("Properties"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..f6b5faa79 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.EN.md @@ -0,0 +1,67 @@ +# LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore + +Backend Administration Database Migration Module, providing database migration functionality for the backend management system. + +[简体中文](./README.md) + +## Features + +* Integrated SaaS multi-tenancy data migration +* Integrated Setting Management data migration +* Integrated Data Protection Management data migration +* Integrated Permission Management data migration +* Integrated Feature Management data migration +* Integrated Text Templating data migration +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "BackendAdminDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure BackendAdminDbMigrator connection string in appsettings.json + +2. Add Module Dependency + ```csharp + [DependsOn(typeof(BackendAdminMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## Database Tables Description + +* Saas Related Tables - Tenant, edition and other multi-tenancy related data +* AbpSettings - System settings data +* AbpDataProtection - Data protection related data +* AbpPermissionGrants - Permission authorization data +* AbpFeatures - Feature data +* AbpTextTemplates - Text template data + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ASP.NET Core Data Protection](https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/introduction) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.md new file mode 100644 index 000000000..f992e2273 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/README.md @@ -0,0 +1,67 @@ +# LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore + +后台管理数据迁移模块,提供后台管理系统相关的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成SaaS多租户数据迁移 +* 集成设置管理数据迁移 +* 集成数据保护管理数据迁移 +* 集成权限管理数据迁移 +* 集成特性管理数据迁移 +* 集成文本模板数据迁移 +* 支持MySQL数据库 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "BackendAdminDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置BackendAdminDbMigrator连接字符串 + +2. 添加模块依赖 + ```csharp + [DependsOn(typeof(BackendAdminMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## 数据库表说明 + +* Saas相关表 - 租户、版本等多租户相关数据 +* AbpSettings - 系统设置数据 +* AbpDataProtection - 数据保护相关数据 +* AbpPermissionGrants - 权限授权数据 +* AbpFeatures - 功能特性数据 +* AbpTextTemplates - 文本模板数据 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ASP.NET Core数据保护](https://docs.microsoft.com/zh-cn/aspnet/core/security/data-protection/introduction) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs new file mode 100644 index 000000000..995b37e8f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs @@ -0,0 +1,60 @@ +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator; + +public class AuthServerDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public AuthServerDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(AuthServerDbMigratorHostedService).Assembly; + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .SeedAsync(new DataSeedContext()); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs new file mode 100644 index 000000000..27d1699dc --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator; +public partial class AuthServerDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs new file mode 100644 index 000000000..784fb6a0f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs @@ -0,0 +1,19 @@ +using LINGYUN.Abp.Identity.Notifications; +using LINGYUN.Abp.Notifications.Common; +using LINGYUN.Abp.Notifications.EntityFrameworkCore; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator; + +[DependsOn( + typeof(AuthServerMigrationsEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpNotificationsCommonModule), + typeof(AbpIdentityNotificationsModule), + typeof(AbpAutofacModule) + )] +public partial class AuthServerDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs new file mode 100644 index 000000000..e6485dae1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs @@ -0,0 +1,20 @@ +using LINGYUN.Abp.MicroService.AuthServer.DbMigrator.DataSeeds; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator; + +public class AuthServerInitializeDataSeeder : ITransientDependency +{ + protected IdentityUserNotificationDataSeeder UserNotificationDataSeeder { get; } + public AuthServerInitializeDataSeeder(IdentityUserNotificationDataSeeder userNotificationDataSeeder) + { + UserNotificationDataSeeder = userNotificationDataSeeder; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + await UserNotificationDataSeeder.SeedAsync(context); + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs new file mode 100644 index 000000000..2a5b84344 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs @@ -0,0 +1,89 @@ +using LINGYUN.Abp.Identity.Notifications; +using LINGYUN.Abp.Notifications; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; +using Volo.Abp.Users; + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator.DataSeeds; + +public class IdentityUserNotificationDataSeeder : ITransientDependency +{ + public ILogger Logger { protected get; set; } + protected IdentityUserManager IdentityUserManager { get; } + protected INotificationSender NotificationSender { get; } + protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } + public IdentityUserNotificationDataSeeder( + IdentityUserManager identityUserManager, + INotificationSender notificationSender, + INotificationSubscriptionManager notificationSubscriptionManager) + { + IdentityUserManager = identityUserManager; + NotificationSender = notificationSender; + NotificationSubscriptionManager = notificationSubscriptionManager; + + Logger = NullLogger.Instance; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + await SubscribeDefaultNotifierAsync(context); + } + + protected async virtual Task SubscribeDefaultNotifierAsync(DataSeedContext context) + { + var user = await IdentityUserManager.FindByNameAsync("admin"); + if (user == null) + { + Logger.LogInformation("No user information named {UserName} was found, so default messages cannot be subscribed to.", "admin"); + return; + } + Logger.LogInformation("User {UserId} has subscribed to default notifications.", user.Id); + var userIdentifer = new UserIdentifier(user.Id, user.UserName); + // 订阅内置通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.SystemNotice); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.OnsideNotice); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.ActivityNotice); + + // 新用户订阅会话过期通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + IdentityNotificationNames.Session.ExpirationSession); + // 新用户订阅不活跃用户相关通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + IdentityNotificationNames.IdentityUser.InactiveUserReminderNotifier); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + IdentityNotificationNames.IdentityUser.InactiveUserDeactivationNotifier); + + // 订阅用户欢迎消息 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + UserNotificationNames.WelcomeToApplication); + + Logger.LogInformation("User {UserId} is subscribed to notifications by default.", user.Id); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/LINGYUN.Abp.MicroService.AuthServer.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/LINGYUN.Abp.MicroService.AuthServer.DbMigrator.csproj new file mode 100644 index 000000000..2ed8dba19 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/LINGYUN.Abp.MicroService.AuthServer.DbMigrator.csproj @@ -0,0 +1,42 @@ + + + + + + Exe + net10.0 + enable + enable + Debug;Release + AnyCPU + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Program.cs new file mode 100644 index 000000000..310f5d88d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AuthServer", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.AuthServer", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..0824704e2 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.AuthServer.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.EN.md new file mode 100644 index 000000000..a8cc007c5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.EN.md @@ -0,0 +1,66 @@ +# LINGYUN.Abp.MicroService.AuthServer.DbMigrator + +Authentication Server Database Migration Console Application, used for executing database migrations and initializing seed data for the authentication server. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Inherit all migration features from authentication server + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AuthServerMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "AuthServerDbMigrator": "Your database connection string" + }, + "IdentityServer": { + "Clients": { + "AuthServer_App": { + "ClientId": "AuthServer_App" + } + } + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure AuthServerDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) +* [IdentityServer4 Documentation](https://identityserver4.readthedocs.io) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.md new file mode 100644 index 000000000..b3aa305c1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/README.md @@ -0,0 +1,66 @@ +# LINGYUN.Abp.MicroService.AuthServer.DbMigrator + +认证服务器数据库迁移控制台应用程序,用于执行认证服务器的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 继承认证服务器的所有迁移功能 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AuthServerMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "AuthServerDbMigrator": "你的数据库连接字符串" + }, + "IdentityServer": { + "Clients": { + "AuthServer_App": { + "ClientId": "AuthServer_App" + } + } + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置AuthServerDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) +* [IdentityServer4文档](https://identityserver4.readthedocs.io) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/appsettings.json new file mode 100644 index 000000000..2a5785ade --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.DbMigrator/appsettings.json @@ -0,0 +1,35 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "OpenIddict": { + "Applications": { + "VueAdmin": { + "ClientId": "vue-admin-client", + "ClientSecret": "1q2w3e*", + "RootUrls": [ "http://localhost:5666" ] + }, + "InternalService": { + "ClientId": "InternalServiceClient", + "ClientSecret": "1q2w3e*" + }, + "VueOAuthClient": { + "ClientId": "vue-oauth-client", + "RootUrls": [ + "http://localhost:5666", + "http://localhost:30000", + "http://localhost:30010", + "http://localhost:30015", + "http://localhost:30020", + "http://localhost:30025", + "http://localhost:30030", + "http://localhost:30040", + "http://localhost:30045", + "http://localhost:30050", + "http://localhost:30060", + "http://localhost:30070" + ] + } + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs new file mode 100644 index 000000000..b87c0eaea --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs @@ -0,0 +1,36 @@ +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +public class AuthServerDataSeeder : ITransientDependency +{ + protected ICurrentTenant CurrentTenant { get; } + protected OpenIddictDataSeeder OpenIddictDataSeeder { get; } + protected IdentityClaimTypeDataSeeder IdentityClaimTypeDataSeeder { get; } + protected IdentityUserRoleDataSeeder IdentityUserRoleDataSeeder { get; } + public AuthServerDataSeeder( + ICurrentTenant currentTenant, + OpenIddictDataSeeder openIddictDataSeeder, + IdentityClaimTypeDataSeeder identityClaimTypeDataSeeder, + IdentityUserRoleDataSeeder identityUserRoleDataSeeder) + { + CurrentTenant = currentTenant; + OpenIddictDataSeeder = openIddictDataSeeder; + IdentityClaimTypeDataSeeder = identityClaimTypeDataSeeder; + IdentityUserRoleDataSeeder = identityUserRoleDataSeeder; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + using (CurrentTenant.Change(context.TenantId)) + { + await OpenIddictDataSeeder.SeedAsync(context); + await IdentityClaimTypeDataSeeder.SeedAsync(context); + await IdentityUserRoleDataSeeder.SeedAsync(context); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs new file mode 100644 index 000000000..eec405253 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs @@ -0,0 +1,47 @@ +using Microsoft.Extensions.Logging; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.Guids; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +public class AuthServerDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + protected AuthServerDataSeeder DataSeeder { get; } + + public AuthServerDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + IGuidGenerator guidGenerator, + AuthServerDataSeeder dataSeeder) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + // 新租户数据种子 + var context = new DataSeedContext(eventData.Id); + if (eventData.Properties != null) + { + foreach (var property in eventData.Properties) + { + context.WithProperty(property.Key, property.Value); + } + } + + await DataSeeder.SeedAsync(context); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs new file mode 100644 index 000000000..ab23caaec --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs @@ -0,0 +1,38 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +public class AuthServerDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + protected AuthServerDataSeeder DataSeeder { get; } + + public AuthServerDbMigrationService( + AuthServerDataSeeder dataSeeder, + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task SeedAsync() + { + // DbMigrator迁移数据种子 + await DataSeeder.SeedAsync(new DataSeedContext()); + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs new file mode 100644 index 000000000..8ffcd519a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs @@ -0,0 +1,31 @@ +using LINGYUN.Abp.Gdpr.EntityFrameworkCore; +using LINGYUN.Abp.Identity.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.OpenIddict.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +[ConnectionStringName("AuthServerDbMigrator")] +public class AuthServerMigrationsDbContext : AbpDbContext +{ + public AuthServerMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureIdentity(); + modelBuilder.ConfigureOpenIddict(); + + modelBuilder.ConfigureGdpr(); + + modelBuilder.ConfigureIdentityUserInactive(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs new file mode 100644 index 000000000..11c65300b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public AuthServerMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new AuthServerMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.AuthServer.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..5bad32748 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,58 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.Gdpr.EntityFrameworkCore; +using LINGYUN.Abp.Identity.EntityFrameworkCore; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using LINGYUN.Platform.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Authorization; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.OpenIddict.EntityFrameworkCore; +using Volo.Abp.OpenIddict.Tokens; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; + +[DependsOn( + typeof(AbpAuthorizationModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpOpenIddictEntityFrameworkCoreModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + typeof(AbpGdprEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(PlatformEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class AuthServerMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + + context.Services.AddAbpDbContext(options => + { + options.AddRepository(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs new file mode 100644 index 000000000..01b2393e6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs @@ -0,0 +1,96 @@ +using JetBrains.Annotations; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using OpenIddict.Abstractions; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Volo.Abp.Identity; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; +public class IdentityClaimTypeDataSeeder : ITransientDependency +{ + public ILogger Logger { protected get; set; } + + protected IGuidGenerator GuidGenerator { get; } + protected IdentityClaimTypeManager IdentityClaimTypeManager { get; } + protected IIdentityClaimTypeRepository IdentityClaimTypeRepository { get; } + public IdentityClaimTypeDataSeeder( + IGuidGenerator guidGenerator, + IdentityClaimTypeManager identityClaimTypeManager, + IIdentityClaimTypeRepository identityClaimTypeRepository) + { + GuidGenerator = guidGenerator; + IdentityClaimTypeManager = identityClaimTypeManager; + IdentityClaimTypeRepository = identityClaimTypeRepository; + + Logger = NullLogger.Instance; + } + + public async virtual Task SeedAsync(DataSeedContext context) + { + if (context.TenantId.HasValue) + { + return; + } + + Logger.LogInformation("Seeding the default identity claim types..."); + + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Address); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Birthdate, valueType: IdentityClaimValueType.DateTime); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Country); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Email); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.EmailVerified, valueType: IdentityClaimValueType.Boolean); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.FamilyName); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Gender); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.GivenName); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Locale); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Locality); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.MiddleName); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Name); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Nickname); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PhoneNumber); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PhoneNumberVerified, valueType: IdentityClaimValueType.Boolean); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Picture); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PostalCode); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PreferredUsername); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Profile); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Region); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Role); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.StreetAddress); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Username); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Website); + await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Zoneinfo); + + Logger.LogInformation("Seeding default identity claim types completed."); + } + + private async Task CreateIdentityClaimTypeAsync( + [NotNull] string name, + bool required = false, + bool isStatic = false, + [CanBeNull] string? regex = null, + [CanBeNull] string? regexDescription = null, + [CanBeNull] string? description = null, + IdentityClaimValueType valueType = IdentityClaimValueType.String) + { + Logger.LogInformation("Check claim types {name} exists.", name); + + if (!await IdentityClaimTypeRepository.AnyAsync(name)) + { + Logger.LogInformation("Create new claim types {name}.", name); + + await IdentityClaimTypeManager.CreateAsync( + new IdentityClaimType( + GuidGenerator.Create(), + name, + required, + isStatic, + regex, + regexDescription, + description, + valueType)); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs new file mode 100644 index 000000000..3fd7a2b61 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs @@ -0,0 +1,149 @@ +using Microsoft.AspNetCore.Identity; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Options; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Volo.Abp.Identity; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; + +public class IdentityUserRoleDataSeeder : ITransientDependency +{ + public const string AdminUserIdPropertyName = "AdminUserId"; + public const string AdminEmailPropertyName = "AdminEmail"; + public const string AdminEmailDefaultValue = "admin@abp.io"; + public const string AdminUserNamePropertyName = "AdminUserName"; + public const string AdminUserNameDefaultValue = "admin"; + public const string AdminPasswordPropertyName = "AdminPassword"; + public const string AdminPasswordDefaultValue = "1q2w3E*"; + + public ILogger Logger { protected get; set; } + + protected IGuidGenerator GuidGenerator { get; } + protected IIdentityRoleRepository RoleRepository { get; } + protected IIdentityUserRepository UserRepository { get; } + protected ILookupNormalizer LookupNormalizer { get; } + protected IdentityUserManager UserManager { get; } + protected IdentityRoleManager RoleManager { get; } + protected IOptions IdentityOptions { get; } + + public IdentityUserRoleDataSeeder( + IGuidGenerator guidGenerator, + IIdentityRoleRepository roleRepository, + IIdentityUserRepository userRepository, + ILookupNormalizer lookupNormalizer, + IdentityUserManager userManager, + IdentityRoleManager roleManager, + IOptions identityOptions) + { + GuidGenerator = guidGenerator; + RoleRepository = roleRepository; + UserRepository = userRepository; + LookupNormalizer = lookupNormalizer; + UserManager = userManager; + RoleManager = roleManager; + IdentityOptions = identityOptions; + + Logger = NullLogger.Instance; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + Logger.LogInformation("Seeding the admin user roles..."); + await SeedAdminUserAsync(context); + + Logger.LogInformation("Seeding the default roles..."); + await SeedDefaultRoleAsync(context); + + Logger.LogInformation("Seeding user roles completed."); + } + + private async Task SeedAdminUserAsync(DataSeedContext context) + { + await IdentityOptions.SetAsync(); + + const string adminRoleName = "admin"; + var adminUserName = context[AdminUserNamePropertyName] as string ?? AdminUserNameDefaultValue; + + Guid adminRoleId; + + Logger.LogInformation("Check admin role {adminRoleName} exists.", adminRoleName); + + if (!await RoleManager.RoleExistsAsync(adminRoleName)) + { + Logger.LogInformation("Create new role {adminRoleName}.", adminRoleName); + + adminRoleId = GuidGenerator.Create(); + var adminRole = new IdentityRole( + adminRoleId, + adminRoleName, + context.TenantId) + { + IsStatic = true, + IsPublic = true + }; + (await RoleManager.CreateAsync(adminRole)).CheckErrors(); + } + else + { + var adminRole = await RoleManager.FindByNameAsync(adminRoleName); + adminRoleId = adminRole!.Id; + } + + var adminUserId = GuidGenerator.Create(); + if (context.Properties.TryGetValue(AdminUserIdPropertyName, out var userIdString) && + Guid.TryParse(userIdString?.ToString(), out var adminUserGuid)) + { + adminUserId = adminUserGuid; + } + var adminEmailAddress = context[AdminEmailPropertyName] as string ?? AdminEmailDefaultValue; + var adminPassword = context[AdminPasswordPropertyName] as string ?? AdminPasswordDefaultValue; + + Logger.LogInformation("Check admin user {adminUserName} exists.", adminUserName); + + var adminUser = await UserManager.FindByNameAsync(adminUserName); + if (adminUser == null) + { + Logger.LogInformation("Create new user {adminUserName}.", adminUserName); + + adminUser = new IdentityUser( + adminUserId, + adminUserName, + adminEmailAddress, + context.TenantId); + + adminUser.AddRole(adminRoleId); + + // 创建租户管理用户 + (await UserManager.CreateAsync(adminUser)).CheckErrors(); + + Logger.LogInformation("Add user {adminUserName} password.", adminUserName); + (await UserManager.AddPasswordAsync(adminUser, adminPassword)).CheckErrors(); + } + } + + private async Task SeedDefaultRoleAsync(DataSeedContext context) + { + const string defaultRoleName = "Users"; + Logger.LogInformation("Check Role {defaultRoleName} exists.", defaultRoleName); + if (!await RoleManager.RoleExistsAsync(defaultRoleName)) + { + Logger.LogInformation("Create new role {defaultRoleName}.", defaultRoleName); + var roleId = GuidGenerator.Create(); + var defaultRole = new IdentityRole( + roleId, + defaultRoleName, + context.TenantId) + { + IsStatic = true, + IsPublic = true, + IsDefault = true, + }; + (await RoleManager.CreateAsync(defaultRole)).CheckErrors(); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs new file mode 100644 index 000000000..f622ab96f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs @@ -0,0 +1,437 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using OpenIddict.Abstractions; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.OpenIddict; +using Volo.Abp.OpenIddict.Applications; +using Volo.Abp.OpenIddict.Scopes; +using Volo.Abp.PermissionManagement; + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; + +public class OpenIddictDataSeeder : OpenIddictDataSeedContributorBase, ITransientDependency +{ + public ILogger Logger { protected get; set; } + protected IPermissionDataSeeder PermissionDataSeeder { get; } + public OpenIddictDataSeeder( + IConfiguration configuration, + IOpenIddictApplicationRepository openIddictApplicationRepository, + IAbpApplicationManager applicationManager, + IOpenIddictScopeRepository openIddictScopeRepository, + IOpenIddictScopeManager scopeManager, + IPermissionDataSeeder permissionDataSeeder) + : base(configuration, openIddictApplicationRepository, applicationManager, openIddictScopeRepository, scopeManager) + { + PermissionDataSeeder = permissionDataSeeder; + + Logger = NullLogger.Instance; + } + + public async virtual Task SeedAsync(DataSeedContext context) + { + if (context.TenantId.HasValue) + { + return; + } + var applicationScope = "lingyun-abp-application"; + + Logger.LogInformation("Seeding the default scope..."); + await CreateDefaultScopeAsync(); + await CreateApiScopesAsync(applicationScope); + + Logger.LogInformation("Seeding the default applications..."); + await CreateApplicationAsync(applicationScope); + + Logger.LogInformation("Seeding default applications completed."); + } + + private async Task CreateDefaultScopeAsync() + { + // OpenId Connect + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.OpenId, + "OpenId Connect", + "身份认证", + "OpenId Connect", + "OpenId Connect协议进行身份验证", + "允许应用程序使用您的身份信息进行登录", + "Allow the application to authenticate you using OpenID Connect"); + + // Profile + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.Profile, + "个人资料", + "个人资料", + "Profile", + "访问您的基本个人资料信息", + "允许应用程序访问您的姓名、头像等基本信息", + "Allow the application to access your basic profile information like name and picture"); + + // Email + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.Email, + "电子邮件", + "电子邮件", + "Email", + "访问您的电子邮件地址", + "允许应用程序访问您的电子邮件地址", + "Allow the application to access your email address"); + + // Phone + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.Phone, + "电话号码", + "电话号码", + "Phone", + "访问您的电话号码", + "允许应用程序访问您的电话号码", + "Allow the application to access your phone number"); + + // Address + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.Address, + "地址信息", + "地址信息", + "Address", + "访问您的地址信息", + "允许应用程序访问您的地址信息", + "Allow the application to access your address information"); + + // Roles + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.Roles, + "角色信息", + "角色信息", + "Roles", + "访问您的角色信息", + "允许应用程序访问您的角色和权限信息", + "Allow the application to access your roles and permissions"); + + // OfflineAccess + await CreateServiceScopeAsync( + OpenIddictConstants.Scopes.OfflineAccess, + "离线访问", + "离线访问", + "Offline access", + "在您未登录时访问您的信息", + "允许应用程序在您未登录时访问您的信息", + "Allow the application to access your information while you are offline"); + } + + private async Task CreateApiScopesAsync(string scope) + { + // 前端汇总授权范围 + await CreateServiceScopeAsync( + scope, + "微服务访问授权", + "微服务访问授权", + "MicroService applications access", + "适用于微服务体系的接口授权", + "允许应用程序使用各微服务模块的接口", + "Allow the application to use the interfaces of each microservice module", + [ + "api-gateway", + "auth-server", + "admin-service", + "ai-service", + "identity-service", + "localization-service", + "message-service", + "platform-service", + "task-service", + "webhook-service", + "wechat-service", + "workflow-service" + ]); + // ApiGateway Swagger + await CreateServiceScopeAsync( + "api-gateway", + "Api Gateway", + "应用程序接口网关", + "Api Gateway", + "适用于应用程序接口网关Swagger授权", + "适用于应用程序接口网关Swagger授权", + "Applicable to application Programming interface gateway Swagger authorization", + ["api-gateway"]); + // Admin Service + await CreateServiceScopeAsync( + "admin-service", + "Admin Service", + "后台管理服务", + "Admin Service", + "适用于后台管理服务Swagger授权", + "适用于后台管理服务Swagger授权", + "Applicable to the back-end management service Swagger authorization", + ["admin-service"]); + // Auth Server + await CreateServiceScopeAsync( + "auth-server", + "Auth Server", + "身份认证服务器", + "Auth Server", + "适用于身份认证服务器Swagger授权", + "适用于身份认证服务器Swagger授权", + "Applicable to the auth server Swagger authorization", + ["auth-server"]); + // Identity Service + await CreateServiceScopeAsync( + "identity-service", + "Identity Service", + "身份认证服务", + "Identity Service", + "适用于身份认证服务Swagger授权", + "适用于身份认证服务Swagger授权", + "Applicable to the identity service Swagger authorization", + ["identity-service"]); + // Localization Service + await CreateServiceScopeAsync( + "localization-service", + "Localization Service", + "本地化管理服务", + "Localization Service", + "适用于本地化管理服务Swagger授权", + "适用于本地化管理服务Swagger授权", + "Applicable to the Localization service Swagger authorization", + ["localization-service"]); + // Message Service + await CreateServiceScopeAsync( + "message-service", + "Message Service", + "消息管理服务", + "Message Service", + "适用于消息管理服务Swagger授权", + "适用于消息管理服务Swagger授权", + "Applicable to the Message service Swagger authorization", + ["message-service"]); + // Platform Service + await CreateServiceScopeAsync( + "platform-service", + "Platform Service", + "平台管理服务", + "Platform Service", + "适用于平台管理服务Swagger授权", + "适用于平台管理服务Swagger授权", + "Applicable to the Platform service Swagger authorization", + ["platform-service"]); + // Task Service + await CreateServiceScopeAsync( + "task-service", + "Task Service", + "任务管理服务", + "Task Service", + "适用于任务管理服务Swagger授权", + "适用于任务管理服务Swagger授权", + "Applicable to the Task service Swagger authorization", + ["task-service"]); + // Webhook Service + await CreateServiceScopeAsync( + "webhook-service", + "Webhook Service", + "Webhook管理服务", + "Webhook Service", + "适用于Webhook管理服务Swagger授权", + "适用于Webhook管理服务Swagger授权", + "Applicable to the Webhook service Swagger authorization", + ["webhook-service"]); + // Wechat Service + await CreateServiceScopeAsync( + "wechat-service", + "Wechat Service", + "微信管理服务", + "Wechat Service", + "适用于微信管理服务Swagger授权", + "适用于微信管理服务Swagger授权", + "Applicable to the Wechat service Swagger authorization", + ["wechat-service"]); + // Workflow Service + await CreateServiceScopeAsync( + "workflow-service", + "Workflow Service", + "工作流管理服务", + "Workflow Service", + "适用于工作流管理服务Swagger授权", + "适用于工作流管理服务Swagger授权", + "Applicable to the Workflow service Swagger authorization", + ["workflow-service"]); + // AI Service + await CreateServiceScopeAsync( + "ai-service", + "Artificial Intelligence Service", + "AI管理服务", + "Artificial Intelligence Service", + "适用于AI管理服务Swagger授权", + "适用于AI管理服务Swagger授权", + "Applicable to the Artificial Intelligence service Swagger authorization", + ["ai-service"]); + } + + private async Task CreateApplicationAsync(string scope) + { + var configurationSection = Configuration.GetSection("OpenIddict:Applications"); + var vueClientId = configurationSection["VueAdmin:ClientId"]; + if (!vueClientId.IsNullOrWhiteSpace()) + { + Logger.LogInformation("Seeding application {vueClientId}...", vueClientId); + + var vueClientRootUrls = configurationSection.GetSection("VueAdmin:RootUrls").Get>() ?? []; + + var vueClientRedirectUrls = new List(); + var vueClientPostLogoutRedirectUrls = new List(); + vueClientRootUrls.ForEach(url => + { + vueClientRedirectUrls.Add(url.EnsureEndsWith('/')); + vueClientRedirectUrls.Add(url.EnsureEndsWith('/') + "signin-callback"); + + vueClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/')); + vueClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/') + "signout-callback"); + }); + + await CreateOrUpdateApplicationAsync( + OpenIddictConstants.ApplicationTypes.Web, + vueClientId, + OpenIddictConstants.ClientTypes.Confidential, + OpenIddictConstants.ConsentTypes.Explicit, + "Abp Vue Admin Client", + configurationSection["VueAdmin:ClientSecret"] ?? "1q2w3e*", + [OpenIddictConstants.GrantTypes.AuthorizationCode, + OpenIddictConstants.GrantTypes.Password, + OpenIddictConstants.GrantTypes.RefreshToken, + // TODO: 引用项目? + "link_user", + "impersonation"], + [OpenIddictConstants.Scopes.OpenId, + OpenIddictConstants.Scopes.Email, + OpenIddictConstants.Scopes.Roles, + OpenIddictConstants.Scopes.Address, + OpenIddictConstants.Scopes.Phone, + OpenIddictConstants.Scopes.Profile, + OpenIddictConstants.Scopes.OfflineAccess, + scope], + vueClientRedirectUrls, + vueClientPostLogoutRedirectUrls); + + var vueClientPermissions = new string[1] + { + "AbpIdentity.UserLookup" + }; + await PermissionDataSeeder.SeedAsync(ClientPermissionValueProvider.ProviderName, vueClientId, vueClientPermissions); + } + + var internalServiceClientId = configurationSection["InternalService:ClientId"]; + if (!internalServiceClientId.IsNullOrWhiteSpace()) + { + Logger.LogInformation("Seeding application {internalServiceClientId}...", internalServiceClientId); + + await CreateOrUpdateApplicationAsync( + OpenIddictConstants.ApplicationTypes.Web, + internalServiceClientId, + OpenIddictConstants.ClientTypes.Confidential, + OpenIddictConstants.ConsentTypes.Implicit, + "Abp Internal Service Client", + configurationSection["InternalService:ClientSecret"] ?? "1q2w3e*", + [OpenIddictConstants.GrantTypes.ClientCredentials], + [scope]); + } + + var oauthClientId = configurationSection["VueOAuthClient:ClientId"]; + if (!oauthClientId.IsNullOrWhiteSpace()) + { + Logger.LogInformation("Seeding application {oauthClientId}...", oauthClientId); + + var oauthClientRootUrls = configurationSection.GetSection("VueOAuthClient:RootUrls").Get>() ?? []; + + var oauthClientRedirectUrls = new List(); + var oauthClientPostLogoutRedirectUrls = new List(); + oauthClientRootUrls.ForEach(url => + { + oauthClientRedirectUrls.Add(url.EnsureEndsWith('/')); + oauthClientRedirectUrls.Add(url.EnsureEndsWith('/') + "signin-callback"); + oauthClientRedirectUrls.Add(url.EnsureEndsWith('/') + "swagger/oauth2-redirect.html"); + + oauthClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/')); + oauthClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/') + "signout-callback"); + }); + + await CreateOrUpdateApplicationAsync( + OpenIddictConstants.ApplicationTypes.Web, + oauthClientId, + OpenIddictConstants.ClientTypes.Public, + OpenIddictConstants.ConsentTypes.Implicit, + "Abp OAuth Client", + null, + [OpenIddictConstants.GrantTypes.AuthorizationCode, + OpenIddictConstants.GrantTypes.RefreshToken, + "link_user", + "impersonation"], + [OpenIddictConstants.Scopes.OpenId, + OpenIddictConstants.Scopes.Email, + OpenIddictConstants.Scopes.Roles, + OpenIddictConstants.Scopes.Address, + OpenIddictConstants.Scopes.Phone, + OpenIddictConstants.Scopes.Profile, + OpenIddictConstants.Scopes.OfflineAccess, + scope, + "api-gateway", + "auth-server", + "admin-service", + "ai-service", + "identity-service", + "localization-service", + "message-service", + "platform-service", + "task-service", + "webhook-service", + "wechat-service", + "workflow-service"], + oauthClientRedirectUrls, + oauthClientPostLogoutRedirectUrls); + + var oauthClientPermissions = new string[1] + { + "AbpIdentity.UserLookup" + }; + await PermissionDataSeeder.SeedAsync(ClientPermissionValueProvider.ProviderName, oauthClientId, oauthClientPermissions); + } + } + + private async Task CreateServiceScopeAsync( + string name, + string displayNameDefault, + string displayNameZh, + string displayNameEn, + string descriptionDefault, + string descriptionZh, + string descriptionEn, + List? resources = null) + { + var descriptor = new OpenIddictScopeDescriptor + { + Name = name, + DisplayName = displayNameDefault, + DisplayNames = + { + [CultureInfo.GetCultureInfo("zh-Hans")] = displayNameZh, + [CultureInfo.GetCultureInfo("en")] = displayNameEn + }, + Description = descriptionDefault, + Descriptions = + { + [CultureInfo.GetCultureInfo("zh-Hans")] = descriptionZh, + [CultureInfo.GetCultureInfo("en")] = descriptionEn + }, + }; + if (resources is { Count: > 0 }) + { + descriptor.Resources.AddIfNotContains(resources); + } + + await CreateScopesAsync(descriptor); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.csproj new file mode 100644 index 000000000..671af80d4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.csproj @@ -0,0 +1,36 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs new file mode 100644 index 000000000..8a1bd7b10 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs @@ -0,0 +1,1108 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20230109085530_Initial-Auth-Server")] + partial class InitialAuthServer + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs new file mode 100644 index 000000000..66289f5f6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs @@ -0,0 +1,738 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialAuthServer : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Required = table.Column(type: "tinyint(1)", nullable: false), + IsStatic = table.Column(type: "tinyint(1)", nullable: false), + Regex = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RegexDescription = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ValueType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + SourceTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TargetTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Code = table.Column(type: "varchar(95)", maxLength: 95, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsDefault = table.Column(type: "tinyint(1)", nullable: false), + IsStatic = table.Column(type: "tinyint(1)", nullable: false), + IsPublic = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Identity = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Action = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Surname = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Email = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + NormalizedEmail = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + EmailConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SecurityStamp = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsExternal = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + IsActive = table.Column(type: "tinyint(1)", nullable: false), + TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetime(6)", nullable: true), + LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OpenIddictApplications", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ClientId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClientSecret = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConsentType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayNames = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Permissions = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + PostLogoutRedirectUris = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Properties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RedirectUris = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Requirements = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ClientUri = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + LogoUri = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictApplications", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OpenIddictScopes", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Descriptions = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayNames = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Properties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Resources = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ProviderKey = table.Column(type: "varchar(196)", maxLength: 196, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProviderDisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Value = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OpenIddictAuthorizations", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreationDate = table.Column(type: "datetime(6)", nullable: true), + Properties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Scopes = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); + table.ForeignKey( + name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId", + column: x => x.ApplicationId, + principalTable: "OpenIddictApplications", + principalColumn: "Id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OpenIddictTokens", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + AuthorizationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreationDate = table.Column(type: "datetime(6)", nullable: true), + ExpirationDate = table.Column(type: "datetime(6)", nullable: true), + Payload = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Properties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RedemptionDate = table.Column(type: "datetime(6)", nullable: true), + ReferenceId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictTokens", x => x.Id); + table.ForeignKey( + name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId", + column: x => x.ApplicationId, + principalTable: "OpenIddictApplications", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId", + column: x => x.AuthorizationId, + principalTable: "OpenIddictAuthorizations", + principalColumn: "Id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictApplications_ClientId", + table: "OpenIddictApplications", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type", + table: "OpenIddictAuthorizations", + columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictScopes_Name", + table: "OpenIddictScopes", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type", + table: "OpenIddictTokens", + columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_AuthorizationId", + table: "OpenIddictTokens", + column: "AuthorizationId"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_ReferenceId", + table: "OpenIddictTokens", + column: "ReferenceId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "OpenIddictScopes"); + + migrationBuilder.DropTable( + name: "OpenIddictTokens"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "OpenIddictAuthorizations"); + + migrationBuilder.DropTable( + name: "OpenIddictApplications"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs new file mode 100644 index 000000000..0ea5b6f09 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs @@ -0,0 +1,1118 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20230323062929_Upgrade-Abp-Framework-To-7.1.0")] + partial class UpgradeAbpFrameworkTo710 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs new file mode 100644 index 000000000..e34b6ff6c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs @@ -0,0 +1,51 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo710 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "EntityVersion", + table: "AbpUsers", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "EntityVersion", + table: "AbpRoles", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "EntityVersion", + table: "AbpOrganizationUnits", + type: "int", + nullable: false, + defaultValue: 0); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "EntityVersion", + table: "AbpUsers"); + + migrationBuilder.DropColumn( + name: "EntityVersion", + table: "AbpRoles"); + + migrationBuilder.DropColumn( + name: "EntityVersion", + table: "AbpOrganizationUnits"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs new file mode 100644 index 000000000..60cf7564b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs @@ -0,0 +1,1151 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20230515095522_FixUser")] + partial class FixUser + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs new file mode 100644 index 000000000..4acf7039b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs @@ -0,0 +1,60 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class FixUser : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "LastPasswordChangeTime", + table: "AbpUsers", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "ShouldChangePasswordOnNextLogin", + table: "AbpUsers", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.CreateTable( + name: "AbpUserDelegations", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + StartTime = table.Column(type: "datetime(6)", nullable: false), + EndTime = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpUserDelegations"); + + migrationBuilder.DropColumn( + name: "LastPasswordChangeTime", + table: "AbpUsers"); + + migrationBuilder.DropColumn( + name: "ShouldChangePasswordOnNextLogin", + table: "AbpUsers"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs new file mode 100644 index 000000000..13072c434 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs @@ -0,0 +1,1169 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20231028084216_Upgrade-Abp-Framework-To-7.4.0")] + partial class UpgradeAbpFrameworkTo740 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs new file mode 100644 index 000000000..80f90fc30 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs @@ -0,0 +1,558 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo740 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "OpenIddictTokens", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictTokens", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictTokens", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictTokens", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictScopes", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictScopes", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictScopes", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictScopes", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictAuthorizations", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictAuthorizations", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictAuthorizations", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictAuthorizations", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictApplications", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictApplications", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "OpenIddictApplications", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictApplications", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpUsers", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpUsers", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpUsers", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpUsers", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpSecurityLogs", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpSecurityLogs", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpSecurityLogs", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpSecurityLogs", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpRoles", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpRoles", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpRoles", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpRoles", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpOrganizationUnits", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpOrganizationUnits", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpOrganizationUnits", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpOrganizationUnits", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpClaimTypes", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpClaimTypes", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AbpClaimTypes", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpClaimTypes", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictTokens", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictTokens", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictScopes", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictScopes", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictAuthorizations", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictAuthorizations", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictApplications", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictApplications", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpUsers", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpUsers", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpSecurityLogs", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpSecurityLogs", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpRoles", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpRoles", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpOrganizationUnits", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpOrganizationUnits", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpClaimTypes", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpClaimTypes", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs new file mode 100644 index 000000000..b88276e34 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs @@ -0,0 +1,1179 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20240413021934_Upgrade-Abp-Framework-To-8-1-0")] + partial class UpgradeAbpFrameworkTo810 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs new file mode 100644 index 000000000..68d6f23e8 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo810 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Type", + table: "OpenIddictApplications", + newName: "ClientType"); + + migrationBuilder.AddColumn( + name: "ApplicationType", + table: "OpenIddictApplications", + type: "varchar(50)", + maxLength: 50, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "Settings", + table: "OpenIddictApplications", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ApplicationType", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "Settings", + table: "OpenIddictApplications"); + + migrationBuilder.RenameColumn( + name: "ClientType", + table: "OpenIddictApplications", + newName: "Type"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs new file mode 100644 index 000000000..ca9d64db7 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs @@ -0,0 +1,1234 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20240729101555_Upgrade-Abp-Framework-To-8-2-0")] + partial class UpgradeAbpFrameworkTo820 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("IpAddresses") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs new file mode 100644 index 000000000..78eb9b4e4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs @@ -0,0 +1,63 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo820 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpSessions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + SessionId = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Device = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DeviceInfo = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IpAddresses = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SignedIn = table.Column(type: "datetime(6)", nullable: false), + LastAccessed = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSessions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_Device", + table: "AbpSessions", + column: "Device"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_SessionId", + table: "AbpSessions", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_TenantId_UserId", + table: "AbpSessions", + columns: new[] { "TenantId", "UserId" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpSessions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs new file mode 100644 index 000000000..34d107d0d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs @@ -0,0 +1,1178 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20250214022911_Upgrade-Abp-Framework-To-9.0.4")] + partial class UpgradeAbpFrameworkTo904 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "9.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs new file mode 100644 index 000000000..bd85cfbba --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs @@ -0,0 +1,206 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo904 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "CreationTime", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "CreatorId", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "DeleterId", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "DeletionTime", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "IsDeleted", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "LastModificationTime", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "LastModifierId", + table: "OpenIddictTokens"); + + migrationBuilder.DropColumn( + name: "CreationTime", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "CreatorId", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "DeleterId", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "DeletionTime", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "IsDeleted", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "LastModificationTime", + table: "OpenIddictAuthorizations"); + + migrationBuilder.DropColumn( + name: "LastModifierId", + table: "OpenIddictAuthorizations"); + + migrationBuilder.AlterColumn( + name: "IpAddresses", + table: "AbpSessions", + type: "varchar(2048)", + maxLength: 2048, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256)", + oldMaxLength: 256, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "ExtraProperties", + table: "AbpSessions", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ExtraProperties", + table: "AbpSessions"); + + migrationBuilder.AddColumn( + name: "CreationTime", + table: "OpenIddictTokens", + type: "datetime(6)", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "CreatorId", + table: "OpenIddictTokens", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AddColumn( + name: "DeleterId", + table: "OpenIddictTokens", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AddColumn( + name: "DeletionTime", + table: "OpenIddictTokens", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "IsDeleted", + table: "OpenIddictTokens", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "LastModificationTime", + table: "OpenIddictTokens", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "LastModifierId", + table: "OpenIddictTokens", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AddColumn( + name: "CreationTime", + table: "OpenIddictAuthorizations", + type: "datetime(6)", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "CreatorId", + table: "OpenIddictAuthorizations", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AddColumn( + name: "DeleterId", + table: "OpenIddictAuthorizations", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AddColumn( + name: "DeletionTime", + table: "OpenIddictAuthorizations", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "IsDeleted", + table: "OpenIddictAuthorizations", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "LastModificationTime", + table: "OpenIddictAuthorizations", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "LastModifierId", + table: "OpenIddictAuthorizations", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AlterColumn( + name: "IpAddresses", + table: "AbpSessions", + type: "varchar(256)", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(2048)", + oldMaxLength: 2048, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs new file mode 100644 index 000000000..d0bd57e90 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs @@ -0,0 +1,1254 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20250226011251_Add-Gdpr-Module")] + partial class AddGdprModule + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "9.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Provider"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RequestId"); + + b.ToTable("AbpGdprInfos", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ReadyTime") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpGdprRequests", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) + .WithMany("Infos") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Navigation("Infos"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs new file mode 100644 index 000000000..11573df1d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs @@ -0,0 +1,77 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class AddGdprModule : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpGdprRequests", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + ReadyTime = table.Column(type: "datetime(6)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpGdprRequests", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpGdprInfos", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RequestId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Data = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpGdprInfos", x => x.Id); + table.ForeignKey( + name: "FK_AbpGdprInfos_AbpGdprRequests_RequestId", + column: x => x.RequestId, + principalTable: "AbpGdprRequests", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpGdprInfos_RequestId", + table: "AbpGdprInfos", + column: "RequestId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpGdprRequests_UserId", + table: "AbpGdprRequests", + column: "UserId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpGdprInfos"); + + migrationBuilder.DropTable( + name: "AbpGdprRequests"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs new file mode 100644 index 000000000..bcbb49cb0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs @@ -0,0 +1,1262 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20250410015403_Upgrade-Abp-Framework-To-9-1-1")] + partial class UpgradeAbpFrameworkTo911 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Provider"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RequestId"); + + b.ToTable("AbpGdprInfos", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ReadyTime") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpGdprRequests", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) + .WithMany("Infos") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Navigation("Infos"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs new file mode 100644 index 000000000..d9b68a961 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo911 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "CreationTime", + table: "AbpRoles", + type: "datetime(6)", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + + migrationBuilder.AddColumn( + name: "CreationTime", + table: "AbpClaimTypes", + type: "datetime(6)", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "CreationTime", + table: "AbpRoles"); + + migrationBuilder.DropColumn( + name: "CreationTime", + table: "AbpClaimTypes"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs new file mode 100644 index 000000000..197881403 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs @@ -0,0 +1,1375 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20260420064613_Upgrade-Abp-Framework-To-10-0-2")] + partial class UpgradeAbpFrameworkTo1002 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Provider"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RequestId"); + + b.ToTable("AbpGdprInfos", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ReadyTime") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpGdprRequests", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LastSignInTime") + .HasColumnType("datetime(6)"); + + b.Property("Leaved") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("Leaved"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.Property("CredentialId") + .HasMaxLength(1024) + .HasColumnType("varbinary(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("CredentialId"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserPasskeys", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("Password") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "Password"); + + b.ToTable("AbpUserPasswordHistories", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("longtext"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) + .WithMany("Infos") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Passkeys") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId"); + + b1.Property("AttestationObject"); + + b1.Property("ClientDataJson"); + + b1.Property("CreatedAt"); + + b1.Property("IsBackedUp"); + + b1.Property("IsBackupEligible"); + + b1.Property("IsUserVerified"); + + b1.Property("Name"); + + b1.Property("PublicKey"); + + b1.Property("SignCount"); + + b1.PrimitiveCollection("Transports"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AbpUserPasskeys"); + + b1 + .ToJson("Data") + .HasColumnType("json"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("PasswordHistories") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Navigation("Infos"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Passkeys"); + + b.Navigation("PasswordHistories"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs new file mode 100644 index 000000000..fdda438d5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs @@ -0,0 +1,157 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo1002 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Type", + table: "OpenIddictTokens", + type: "varchar(150)", + maxLength: 150, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(50)", + oldMaxLength: 50, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "FrontChannelLogoutUri", + table: "OpenIddictApplications", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "LastSignInTime", + table: "AbpUsers", + type: "datetime(6)", + nullable: true); + + migrationBuilder.AddColumn( + name: "Leaved", + table: "AbpUsers", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AlterColumn( + name: "DeviceInfo", + table: "AbpSessions", + type: "varchar(256)", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(64)", + oldMaxLength: 64, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserPasskeys", + columns: table => new + { + CredentialId = table.Column(type: "varbinary(1024)", maxLength: 1024, nullable: false), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Data = table.Column(type: "json", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserPasskeys", x => x.CredentialId); + table.ForeignKey( + name: "FK_AbpUserPasskeys_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpUserPasswordHistories", + columns: table => new + { + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Password = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserPasswordHistories", x => new { x.UserId, x.Password }); + table.ForeignKey( + name: "FK_AbpUserPasswordHistories_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserPasskeys_UserId", + table: "AbpUserPasskeys", + column: "UserId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpUserPasskeys"); + + migrationBuilder.DropTable( + name: "AbpUserPasswordHistories"); + + migrationBuilder.DropColumn( + name: "FrontChannelLogoutUri", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "LastSignInTime", + table: "AbpUsers"); + + migrationBuilder.DropColumn( + name: "Leaved", + table: "AbpUsers"); + + migrationBuilder.AlterColumn( + name: "Type", + table: "OpenIddictTokens", + type: "varchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(150)", + oldMaxLength: 150, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "DeviceInfo", + table: "AbpSessions", + type: "varchar(64)", + maxLength: 64, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(256)", + oldMaxLength: 256, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs new file mode 100644 index 000000000..7366b55ab --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs @@ -0,0 +1,1417 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20260530061141_Add-Identity-User-Inactive")] + partial class AddIdentityUserInactive + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Provider"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RequestId"); + + b.ToTable("AbpGdprInfos", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ReadyTime") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpGdprRequests", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Identity.IdentityUserInactive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeactivatedTime") + .HasColumnType("datetime(6)"); + + b.Property("LastNotificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastSignInTime") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpUserInactives", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LastSignInTime") + .HasColumnType("datetime(6)"); + + b.Property("Leaved") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("Leaved"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.Property("CredentialId") + .HasMaxLength(1024) + .HasColumnType("varbinary(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("CredentialId"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserPasskeys", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("Password") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "Password"); + + b.ToTable("AbpUserPasswordHistories", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("longtext"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) + .WithMany("Infos") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Passkeys") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId"); + + b1.Property("AttestationObject"); + + b1.Property("ClientDataJson"); + + b1.Property("CreatedAt"); + + b1.Property("IsBackedUp"); + + b1.Property("IsBackupEligible"); + + b1.Property("IsUserVerified"); + + b1.Property("Name"); + + b1.Property("PublicKey"); + + b1.Property("SignCount"); + + b1.PrimitiveCollection("Transports"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AbpUserPasskeys"); + + b1 + .ToJson("Data") + .HasColumnType("json"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("PasswordHistories") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Navigation("Infos"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Passkeys"); + + b.Navigation("PasswordHistories"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs new file mode 100644 index 000000000..2b97537e0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class AddIdentityUserInactive : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpUserInactives", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastSignInTime = table.Column(type: "datetime(6)", nullable: false), + LastNotificationTime = table.Column(type: "datetime(6)", nullable: true), + Status = table.Column(type: "int", nullable: false), + DeactivatedTime = table.Column(type: "datetime(6)", nullable: true), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserInactives", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserInactives_TenantId_UserId", + table: "AbpUserInactives", + columns: new[] { "TenantId", "UserId" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpUserInactives"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..7c2c8f198 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,1414 @@ +// +using System; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.AuthServer.DbMigrator.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + partial class AuthServerMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Data") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Provider"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RequestId"); + + b.ToTable("AbpGdprInfos", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ReadyTime") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpGdprRequests", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Identity.IdentityUserInactive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeactivatedTime") + .HasColumnType("datetime(6)"); + + b.Property("LastNotificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastSignInTime") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpUserInactives", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime(6)"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LastSignInTime") + .HasColumnType("datetime(6)"); + + b.Property("Leaved") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("Leaved"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.Property("CredentialId") + .HasMaxLength(1024) + .HasColumnType("varbinary(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("CredentialId"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserPasskeys", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("Password") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "Password"); + + b.ToTable("AbpUserPasswordHistories", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("longtext"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => + { + b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) + .WithMany("Infos") + .HasForeignKey("RequestId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Passkeys") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId"); + + b1.Property("AttestationObject"); + + b1.Property("ClientDataJson"); + + b1.Property("CreatedAt"); + + b1.Property("IsBackedUp"); + + b1.Property("IsBackupEligible"); + + b1.Property("IsUserVerified"); + + b1.Property("Name"); + + b1.Property("PublicKey"); + + b1.Property("SignCount"); + + b1.PrimitiveCollection("Transports"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AbpUserPasskeys"); + + b1 + .ToJson("Data") + .HasColumnType("json"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("PasswordHistories") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => + { + b.Navigation("Infos"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Passkeys"); + + b.Navigation("PasswordHistories"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..204dfecb1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.EN.md @@ -0,0 +1,76 @@ +# LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore + +Authentication server database migration module, providing database migration functionality required by the authentication server. + +[简体中文](./README.md) + +## Features + +* Integrated OpenIddict authentication framework database migrations +* Integrated ABP Identity module database migrations +* Integrated ABP permission management module database migrations +* Integrated ABP settings management module database migrations +* Integrated ABP feature management module database migrations +* Integrated ABP SaaS multi-tenant module database migrations +* Integrated text templating module database migrations +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpAuthorizationModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpOpenIddictEntityFrameworkCoreModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +public class YourModule : AbpModule +{ + // other +} +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "AuthServerDbMigrator": "your-database-connection-string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure AuthServerDbMigrator connection string in appsettings.json + +2. Add Database Context + ```csharp + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } + ``` + +3. Execute Database Migration + * Use EF Core CLI tools to execute migrations + ```bash + dotnet ef database update + ``` + +## Notes + +* Ensure the database connection string includes the correct permissions to create and modify database tables +* It's recommended to backup the database before executing migrations +* Migration scripts will automatically handle dependencies between modules diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.md new file mode 100644 index 000000000..1a54d0db3 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/README.md @@ -0,0 +1,76 @@ +# LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore + +认证服务器数据库迁移模块,提供认证服务器所需的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成OpenIddict认证框架的数据库迁移 +* 集成ABP Identity模块的数据库迁移 +* 集成ABP权限管理模块的数据库迁移 +* 集成ABP设置管理模块的数据库迁移 +* 集成ABP特性管理模块的数据库迁移 +* 集成ABP SaaS多租户模块的数据库迁移 +* 集成文本模板模块的数据库迁移 +* 支持MySQL数据库 + +## 模块引用 + +```csharp +[DependsOn( + typeof(AbpAuthorizationModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpOpenIddictEntityFrameworkCoreModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +public class YourModule : AbpModule +{ + // other +} +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "AuthServerDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置AuthServerDbMigrator连接字符串 + +2. 添加数据库上下文 + ```csharp + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL(); + }); + } + ``` + +3. 执行数据库迁移 + * 使用EF Core命令行工具执行迁移 + ```bash + dotnet ef database update + ``` + +## 注意事项 + +* 确保数据库连接字符串中包含正确的权限,以便能够创建和修改数据库表 +* 在执行迁移之前,建议先备份数据库 +* 迁移脚本会自动处理模块间的依赖关系 diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Volo/Abp/OpenIddict/Tokens/EfCoreMySqlOpenIddictTokenRepository.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Volo/Abp/OpenIddict/Tokens/EfCoreMySqlOpenIddictTokenRepository.cs similarity index 100% rename from aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Volo/Abp/OpenIddict/Tokens/EfCoreMySqlOpenIddictTokenRepository.cs rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/Volo/Abp/OpenIddict/Tokens/EfCoreMySqlOpenIddictTokenRepository.cs diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator.csproj new file mode 100644 index 000000000..3c8a68781 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator.csproj @@ -0,0 +1,38 @@ + + + + + + Exe + net10.0 + enable + enable + Debug;Release + AnyCPU + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..c29524f4c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorHostedService.cs @@ -0,0 +1,55 @@ +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.LocalizationService.DbMigrator; + +public class LocalizationServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public LocalizationServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(LocalizationServiceDbMigratorHostedService).Assembly; + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..78d165970 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.LocalizationService.DbMigrator; +public partial class LocalizationServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.cs new file mode 100644 index 000000000..1b39038b0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/LocalizationServiceDbMigratorModule.cs @@ -0,0 +1,13 @@ +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.LocalizationService.DbMigrator; + +[DependsOn( + typeof(LocalizationServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) + )] +public partial class LocalizationServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Program.cs new file mode 100644 index 000000000..d23313846 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.LocalizationService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.LocalizationService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.LocalizationService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..2323f8332 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.LocalizationService.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.EN.md new file mode 100644 index 000000000..58b2a70a8 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.EN.md @@ -0,0 +1,68 @@ +# LINGYUN.Abp.MicroService.LocalizationService.DbMigrator + +Localization Management Database Migration Console Application, used for executing database migrations and initializing seed data for the localization management system. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Inherit all migration features from localization management system +* Support multi-language resource management +* Support dynamic language text management +* Support language management + +## Module Dependencies + +```csharp +[DependsOn( + typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "LocalizationManagementDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure LocalizationManagementDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## Seed Data + +* Default language configurations +* Basic localization resources +* System text resources +* Default permission configurations + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ABP Localization Documentation](https://docs.abp.io/en/abp/latest/Localization) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.md new file mode 100644 index 000000000..0b6f2cce4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/README.md @@ -0,0 +1,68 @@ +# LINGYUN.Abp.MicroService.LocalizationService.DbMigrator + +本地化管理数据库迁移控制台应用程序,用于执行本地化管理系统的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 继承本地化管理系统的所有迁移功能 +* 支持多语言资源管理 +* 支持动态语言文本管理 +* 支持语言管理 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "LocalizationManagementDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置LocalizationManagementDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 种子数据 + +* 默认语言配置 +* 基础本地化资源 +* 系统文本资源 +* 默认权限配置 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ABP本地化文档](https://docs.abp.io/zh-Hans/abp/latest/Localization) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..8419b178c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.csproj @@ -0,0 +1,29 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..8109fab56 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationEventHandler.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.Logging; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +public class LocalizationServiceDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + public LocalizationServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationService.cs new file mode 100644 index 000000000..36cb595b3 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceDbMigrationService.cs @@ -0,0 +1,27 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; + +public class LocalizationServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + public LocalizationServiceDbMigrationService( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContext.cs new file mode 100644 index 000000000..6f870d746 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContext.cs @@ -0,0 +1,23 @@ +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; + +[ConnectionStringName("LocalizationManagementDbMigrator")] +public class LocalizationServiceMigrationsDbContext : AbpDbContext +{ + public LocalizationServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureLocalization(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..e5c01a661 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; + +public class LocalizationServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public LocalizationServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new LocalizationServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.LocalizationService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..5772e66d1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/LocalizationServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,40 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class LocalizationServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs new file mode 100644 index 000000000..108a659bf --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs @@ -0,0 +1,169 @@ +// +using System; +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(LocalizationServiceMigrationsDbContext))] + [Migration("20230109093938_Initial-Localization-Management")] + partial class InitialLocalizationManagement + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("FlagIcon") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("FlagIcon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("UiCultureName"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLocalizationLanguages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpLocalizationResources", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Key"); + + b.Property("ResourceName") + .HasColumnType("longtext"); + + b.Property("Value") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("AbpLocalizationTexts", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs new file mode 100644 index 000000000..83419107d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs @@ -0,0 +1,116 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialLocalizationManagement : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLocalizationLanguages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), + CultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UiCultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FlagIcon = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLocalizationLanguages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLocalizationResources", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), + Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLocalizationResources", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLocalizationTexts", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Key = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ResourceName = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLocalizationTexts", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLocalizationLanguages_CultureName", + table: "AbpLocalizationLanguages", + column: "CultureName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLocalizationResources_Name", + table: "AbpLocalizationResources", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLocalizationTexts_Key", + table: "AbpLocalizationTexts", + column: "Key"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpLocalizationLanguages"); + + migrationBuilder.DropTable( + name: "AbpLocalizationResources"); + + migrationBuilder.DropTable( + name: "AbpLocalizationTexts"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs new file mode 100644 index 000000000..1927f08b9 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs @@ -0,0 +1,174 @@ +// +using System; +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(LocalizationServiceMigrationsDbContext))] + [Migration("20230110091142_Add-Default-Culture-Name-With-Resource-Record")] + partial class AddDefaultCultureNameWithResourceRecord + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("FlagIcon") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("FlagIcon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("UiCultureName"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLocalizationLanguages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DefaultCultureName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DefaultCultureName"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpLocalizationResources", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Key"); + + b.Property("ResourceName") + .HasColumnType("longtext"); + + b.Property("Value") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("AbpLocalizationTexts", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs new file mode 100644 index 000000000..3af1c9c0a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddDefaultCultureNameWithResourceRecord : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DefaultCultureName", + table: "AbpLocalizationResources", + type: "varchar(64)", + maxLength: 64, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DefaultCultureName", + table: "AbpLocalizationResources"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs new file mode 100644 index 000000000..3925feecb --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs @@ -0,0 +1,179 @@ +// +using System; +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(LocalizationServiceMigrationsDbContext))] + [Migration("20240729101616_Upgrade-Abp-Framework-To-8-2-0")] + partial class UpgradeAbpFrameworkTo820 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TwoLetterISOLanguageName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("TwoLetterISOLanguageName"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("UiCultureName"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLocalizationLanguages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DefaultCultureName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DefaultCultureName"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpLocalizationResources", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Key"); + + b.Property("ResourceName") + .HasColumnType("longtext"); + + b.Property("Value") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("AbpLocalizationTexts", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs new file mode 100644 index 000000000..a29fd7e26 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs @@ -0,0 +1,47 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo820 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "FlagIcon", + table: "AbpLocalizationLanguages", + newName: "TwoLetterISOLanguageName"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AbpLocalizationTexts", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "TwoLetterISOLanguageName", + table: "AbpLocalizationLanguages", + newName: "FlagIcon"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AbpLocalizationTexts", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/LocalizationServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/LocalizationServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..358cdcded --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/Migrations/LocalizationServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,176 @@ +// +using System; +using LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(LocalizationServiceMigrationsDbContext))] + partial class LocalizationServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TwoLetterISOLanguageName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("TwoLetterISOLanguageName"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("UiCultureName"); + + b.HasKey("Id"); + + b.HasIndex("CultureName"); + + b.ToTable("AbpLocalizationLanguages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DefaultCultureName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DefaultCultureName"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("DisplayName"); + + b.Property("Enable") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Name"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpLocalizationResources", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("CultureName"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Key"); + + b.Property("ResourceName") + .HasColumnType("longtext"); + + b.Property("Value") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("Key"); + + b.ToTable("AbpLocalizationTexts", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..a866b89f2 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.EN.md @@ -0,0 +1,64 @@ +# LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore + +Localization Management Database Migration Module, providing database migration functionality for the localization management system. + +[简体中文](./README.md) + +## Features + +* Integrated SaaS multi-tenancy data migration +* Integrated Localization Management data migration +* Integrated Setting Management data migration +* Integrated Permission Management data migration +* Integrated Feature Management data migration +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "LocalizationManagementDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure LocalizationManagementDbMigrator connection string in appsettings.json + +2. Add Module Dependency + ```csharp + [DependsOn(typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## Database Tables Description + +* AbpLocalization - Localization resources and text data +* Saas Related Tables - Tenant, edition and other multi-tenancy related data +* AbpSettings - System settings data +* AbpPermissionGrants - Permission authorization data +* AbpFeatures - Feature data + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ABP Localization Documentation](https://docs.abp.io/en/abp/latest/Localization) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.md new file mode 100644 index 000000000..30f7461ab --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore/README.md @@ -0,0 +1,64 @@ +# LINGYUN.Abp.MicroService.LocalizationService.EntityFrameworkCore + +本地化管理数据迁移模块,提供本地化管理系统相关的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成SaaS多租户数据迁移 +* 集成本地化管理数据迁移 +* 集成设置管理数据迁移 +* 集成权限管理数据迁移 +* 集成特性管理数据迁移 +* 支持MySQL数据库 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "LocalizationManagementDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置LocalizationManagementDbMigrator连接字符串 + +2. 添加模块依赖 + ```csharp + [DependsOn(typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## 数据库表说明 + +* AbpLocalization - 本地化资源和文本数据 +* Saas相关表 - 租户、版本等多租户相关数据 +* AbpSettings - 系统设置数据 +* AbpPermissionGrants - 权限授权数据 +* AbpFeatures - 功能特性数据 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ABP本地化文档](https://docs.abp.io/zh-Hans/abp/latest/Localization) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/LINGYUN.Abp.MicroService.MessageService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/LINGYUN.Abp.MicroService.MessageService.DbMigrator.csproj new file mode 100644 index 000000000..d5716b878 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/LINGYUN.Abp.MicroService.MessageService.DbMigrator.csproj @@ -0,0 +1,38 @@ + + + + + + Exe + net10.0 + enable + enable + Debug;Release + AnyCPU + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..0ecd46a25 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorHostedService.cs @@ -0,0 +1,55 @@ +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.MessageService.DbMigrator; + +public class MessageServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public MessageServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(MessageServiceDbMigratorHostedService).Assembly; + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..9f1369845 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.MessageService.DbMigrator; +public partial class MessageServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.cs new file mode 100644 index 000000000..76eb982bd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/MessageServiceDbMigratorModule.cs @@ -0,0 +1,15 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.MessageService.DbMigrator; + +[DependsOn( + typeof(MessageServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), + typeof(AbpAutofacModule) + )] +public partial class MessageServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Program.cs new file mode 100644 index 000000000..fb07884c2 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.MessageService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.MessageService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.MessageService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..d704f1490 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.MessageService.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.EN.md new file mode 100644 index 000000000..08c62f1bb --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.EN.md @@ -0,0 +1,69 @@ +# LINGYUN.Abp.MicroService.MessageService.DbMigrator + +Real-time Message Database Migration Console Application, used for executing database migrations and initializing seed data for the real-time message system. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Inherit all migration features from real-time message system +* Support SignalR message management +* Support message group management +* Support message subscription management +* Support message history + +## Module Dependencies + +```csharp +[DependsOn( + typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "RealtimeMessageDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure RealtimeMessageDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## Seed Data + +* Default message group configurations +* Basic message subscription configurations +* System message templates +* Default permission configurations + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [SignalR Documentation](https://docs.microsoft.com/aspnet/core/signalr/introduction) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.md new file mode 100644 index 000000000..177529963 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/README.md @@ -0,0 +1,69 @@ +# LINGYUN.Abp.MicroService.MessageService.DbMigrator + +实时消息数据库迁移控制台应用程序,用于执行实时消息系统的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 继承实时消息系统的所有迁移功能 +* 支持SignalR消息管理 +* 支持消息分组管理 +* 支持消息订阅管理 +* 支持消息历史记录 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "RealtimeMessageDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置RealtimeMessageDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 种子数据 + +* 默认消息组配置 +* 基础消息订阅配置 +* 系统消息模板 +* 默认权限配置 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [SignalR文档](https://docs.microsoft.com/aspnet/core/signalr/introduction) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs new file mode 100644 index 000000000..951d90f32 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs @@ -0,0 +1,140 @@ +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using LINGYUN.Abp.Notifications; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Users; + +namespace LINGYUN.Abp.MicroService.MessageService.DataSeeds; + +public class NotificationDataSeeder : ITransientDependency +{ + public ILogger Logger { protected get; set; } + protected INotificationSender NotificationSender { get; } + protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } + public NotificationDataSeeder( + INotificationSender notificationSender, + INotificationSubscriptionManager notificationSubscriptionManager) + { + NotificationSender = notificationSender; + NotificationSubscriptionManager = notificationSubscriptionManager; + + Logger = NullLogger.Instance; + } + + public virtual async Task SeedAsync(DataSeedContext context) + { + await SubscribeDefaultNotifierAsync(context); + await SeedWelcomeNotifierAsync(context); + } + + public async virtual Task SubscribeDefaultNotifierAsync(DataSeedContext context) + { + if (!context.Properties.TryGetValue(MessageServiceDataSeedConsts.AdminUserIdPropertyName, out var userIdString) || + !Guid.TryParse(userIdString?.ToString(), out var adminUserId)) + { + return; + } + var adminUserName = context.Properties.GetOrDefault(MessageServiceDataSeedConsts.AdminUserNamePropertyName)?.ToString() + ?? MessageServiceDataSeedConsts.AdminUserNameDefaultValue; + var userIdentifer = new UserIdentifier(adminUserId, adminUserName); + // 订阅内置通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.SystemNotice); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.OnsideNotice); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + DefaultNotifications.ActivityNotice); + + // 新用户订阅会话过期通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + "AbpIdentity.Session.Expiration"); + // 新用户订阅不活跃用户相关通知 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + "AbpIdentity.IdentityUser.InactiveUserReminderNotifier"); + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + "AbpIdentity.IdentityUser.InactiveUserDeactivationNotifier"); + + // 订阅用户欢迎消息 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + userIdentifer, + UserNotificationNames.WelcomeToApplication); + } + + public async virtual Task SeedWelcomeNotifierAsync(DataSeedContext context) + { + try + { + if (!context.TenantId.HasValue) + { + return; + } + if (!context.Properties.TryGetValue(MessageServiceDataSeedConsts.AdminUserIdPropertyName, out var userIdString) || + !Guid.TryParse(userIdString?.ToString(), out var adminUserId)) + { + return; + } + var adminEmailAddress = context.Properties.GetOrDefault(MessageServiceDataSeedConsts.AdminEmailPropertyName)?.ToString() + ?? MessageServiceDataSeedConsts.AdminEmailDefaultValue; + var adminUserName = context.Properties.GetOrDefault(MessageServiceDataSeedConsts.AdminUserNamePropertyName)?.ToString() + ?? MessageServiceDataSeedConsts.AdminUserNameDefaultValue; + + var tenantAdminUserIdentifier = new UserIdentifier(adminUserId, adminEmailAddress); + + // 租户管理员订阅事件 + await NotificationSubscriptionManager + .SubscribeAsync( + context.TenantId, + tenantAdminUserIdentifier, + TenantNotificationNames.NewTenantRegistered); + + Logger.LogInformation("publish new tenant notification.."); + await NotificationSender.SendNofiterAsync( + TenantNotificationNames.NewTenantRegistered, + new NotificationTemplate( + TenantNotificationNames.NewTenantRegistered, + formUser: adminEmailAddress, + data: new Dictionary + { + { "name", adminUserName }, + { "email", adminEmailAddress }, + { "id", context.TenantId }, + }), + tenantAdminUserIdentifier, + context.TenantId, + NotificationSeverity.Success); + + Logger.LogInformation("tenant administrator subscribes to new tenant events.."); + } + catch (Exception ex) + { + Logger.LogWarning(ex, "Failed to send the tenant initialization notification."); + } + } +} + diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..15415fbf1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.csproj @@ -0,0 +1,32 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeedConsts.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeedConsts.cs new file mode 100644 index 000000000..e60971b79 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeedConsts.cs @@ -0,0 +1,10 @@ +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +public class MessageServiceDataSeedConsts +{ + public const string AdminUserIdPropertyName = "AdminUserId"; + public const string AdminEmailPropertyName = "AdminEmail"; + public const string AdminEmailDefaultValue = "admin@abp.io"; + public const string AdminUserNamePropertyName = "AdminUserName"; + public const string AdminUserNameDefaultValue = "admin"; +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeeder.cs new file mode 100644 index 000000000..a5588e621 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDataSeeder.cs @@ -0,0 +1,33 @@ +using LINGYUN.Abp.MicroService.MessageService.DataSeeds; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +public class MessageServiceDataSeeder : ITransientDependency +{ + protected NotificationDataSeeder NotificationDataSeeder { get; } + protected ICurrentTenant CurrentTenant { get; } + public MessageServiceDataSeeder( + ICurrentTenant currentTenant, + NotificationDataSeeder notificationDataSeeder) + { + CurrentTenant = currentTenant; + NotificationDataSeeder = notificationDataSeeder; + } + + public async virtual Task SeedAsync(DataSeedContext context) + { + using (CurrentTenant.Change(context.TenantId)) + { + await SeedNotificationAsync(context); + } + } + + private async Task SeedNotificationAsync(DataSeedContext context) + { + await NotificationDataSeeder.SeedAsync(context); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..19cec8b31 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationEventHandler.cs @@ -0,0 +1,88 @@ +using LINGYUN.Abp.Notifications; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +public class MessageServiceDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + protected INotificationSender NotificationSender { get; } + protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } + + public MessageServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + INotificationSender notificationSender, + INotificationSubscriptionManager notificationSubscriptionManager) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + NotificationSender = notificationSender; + NotificationSubscriptionManager = notificationSubscriptionManager; + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + using (CurrentTenant.Change(eventData.Id)) + { + await SendNotificationAsync(eventData); + } + } + + protected async virtual Task SendNotificationAsync(TenantCreatedEto eventData) + { + try + { + if (!eventData.Properties.TryGetValue("AdminUserId", out var userIdString) || + !Guid.TryParse(userIdString, out var adminUserId)) + { + return; + } + var adminEmailAddress = eventData.Properties.GetOrDefault("AdminEmail") ?? "admin@abp.io"; + + var tenantAdminUserIdentifier = new UserIdentifier(adminUserId, adminEmailAddress); + + // 租户管理员订阅事件 + await NotificationSubscriptionManager + .SubscribeAsync( + eventData.Id, + tenantAdminUserIdentifier, + TenantNotificationNames.NewTenantRegistered); + + Logger.LogInformation("publish new tenant notification.."); + await NotificationSender.SendNofiterAsync( + TenantNotificationNames.NewTenantRegistered, + new NotificationTemplate( + TenantNotificationNames.NewTenantRegistered, + formUser: adminEmailAddress, + data: new Dictionary + { + { "name", eventData.Name }, + { "email", adminEmailAddress }, + { "id", eventData.Id }, + }), + tenantAdminUserIdentifier, + eventData.Id, + NotificationSeverity.Success); + + Logger.LogInformation("tenant administrator subscribes to new tenant events.."); + } + catch (Exception ex) + { + Logger.LogWarning(ex, "Failed to send the tenant initialization notification."); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationService.cs new file mode 100644 index 000000000..4a1cbdc03 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceDbMigrationService.cs @@ -0,0 +1,38 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +public class MessageServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + protected MessageServiceDataSeeder DataSeeder { get; } + + public MessageServiceDbMigrationService( + MessageServiceDataSeeder dataSeeder, + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task SeedAsync() + { + // DbMigrator迁移数据种子 + await DataSeeder.SeedAsync(new DataSeedContext()); + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContext.cs new file mode 100644 index 000000000..fdd10c594 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContext.cs @@ -0,0 +1,26 @@ +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using LINGYUN.Abp.Notifications.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +[ConnectionStringName("RealtimeMessageDbMigrator")] +public class MessageServiceMigrationsDbContext : AbpDbContext +{ + public MessageServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureNotifications(); + modelBuilder.ConfigureNotificationsDefinition(); + modelBuilder.ConfigureMessageService(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..77b9ff2eb --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +public class MessageServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public MessageServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new MessageServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.MessageService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..52ffa5030 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/MessageServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,44 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.MessageService.EntityFrameworkCore; +using LINGYUN.Abp.Notifications.EntityFrameworkCore; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class MessageServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs new file mode 100644 index 000000000..5437587ce --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs @@ -0,0 +1,720 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + [Migration("20230110063428_Initial-Realtime-Message")] + partial class InitialRealtimeMessage + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs new file mode 100644 index 000000000..f70b65239 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs @@ -0,0 +1,483 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialRealtimeMessage : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppChatGroups", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + AdminUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupId = table.Column(type: "bigint", nullable: false), + Name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Tag = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Address = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Notice = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + MaxUserCount = table.Column(type: "int", nullable: false), + AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), + AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false), + Description = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + AvatarUrl = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppChatGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppGroupChatBlacks", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + GroupId = table.Column(type: "bigint", nullable: false), + ShieldUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppGroupChatBlacks", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppGroupMessages", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + GroupId = table.Column(type: "bigint", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MessageId = table.Column(type: "bigint", nullable: false), + SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "int", nullable: false), + Source = table.Column(type: "int", nullable: false), + State = table.Column(type: "tinyint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AppGroupMessages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppNotificationDefinitionGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppNotificationDefinitionGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppNotificationDefinitions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + GroupName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + NotificationLifetime = table.Column(type: "int", nullable: false), + NotificationType = table.Column(type: "int", nullable: false), + ContentType = table.Column(type: "int", nullable: false, defaultValue: 0), + Providers = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppNotificationDefinitions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppNotifications", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Severity = table.Column(type: "tinyint", nullable: false), + Type = table.Column(type: "int", nullable: false), + ContentType = table.Column(type: "int", nullable: false, defaultValue: 0), + NotificationId = table.Column(type: "bigint", nullable: false), + NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + NotificationTypeName = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExpirationTime = table.Column(type: "datetime(6)", nullable: true), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppNotifications", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserChatCards", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Sex = table.Column(type: "int", nullable: false), + Sign = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + AvatarUrl = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Birthday = table.Column(type: "datetime(6)", nullable: true), + Age = table.Column(type: "int", nullable: false), + LastOnlineTime = table.Column(type: "datetime(6)", nullable: true), + State = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserChatCards", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserChatFriends", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + FrientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + IsStatic = table.Column(type: "tinyint(1)", nullable: false), + Black = table.Column(type: "tinyint(1)", nullable: false), + DontDisturb = table.Column(type: "tinyint(1)", nullable: false), + SpecialFocus = table.Column(type: "tinyint(1)", nullable: false), + RemarkName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "tinyint unsigned", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserChatFriends", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserChatGroups", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupId = table.Column(type: "bigint", nullable: false), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserChatGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserChatSettings", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), + AllowAddFriend = table.Column(type: "tinyint(1)", nullable: false), + RequireAddFriendValition = table.Column(type: "tinyint(1)", nullable: false), + AllowReceiveMessage = table.Column(type: "tinyint(1)", nullable: false), + AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserGroupCards", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsAdmin = table.Column(type: "tinyint(1)", nullable: false), + SilenceEnd = table.Column(type: "datetime(6)", nullable: true), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserGroupCards", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserMessages", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ReceiveUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MessageId = table.Column(type: "bigint", nullable: false), + SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "int", nullable: false), + Source = table.Column(type: "int", nullable: false), + State = table.Column(type: "tinyint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserMessages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserNotifications", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + NotificationId = table.Column(type: "bigint", nullable: false), + ReadStatus = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserNotifications", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppUserSubscribes", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AppChatGroups_TenantId_Name", + table: "AppChatGroups", + columns: new[] { "TenantId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AppGroupChatBlacks_TenantId_GroupId", + table: "AppGroupChatBlacks", + columns: new[] { "TenantId", "GroupId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppGroupMessages_TenantId_GroupId", + table: "AppGroupMessages", + columns: new[] { "TenantId", "GroupId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppNotifications_TenantId_NotificationName", + table: "AppNotifications", + columns: new[] { "TenantId", "NotificationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserChatCards_TenantId_UserId", + table: "AppUserChatCards", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", + table: "AppUserChatFriends", + columns: new[] { "TenantId", "UserId", "FrientId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserChatGroups_TenantId_GroupId_UserId", + table: "AppUserChatGroups", + columns: new[] { "TenantId", "GroupId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserChatSettings_TenantId_UserId", + table: "AppUserChatSettings", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserGroupCards_TenantId_UserId", + table: "AppUserGroupCards", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppUserMessages_TenantId_ReceiveUserId", + table: "AppUserMessages", + columns: new[] { "TenantId", "ReceiveUserId" }); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_User_Notification_Id", + table: "AppUserNotifications", + columns: new[] { "TenantId", "UserId", "NotificationId" }); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_User_Notification_Name", + table: "AppUserSubscribes", + columns: new[] { "TenantId", "UserId", "NotificationName" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppChatGroups"); + + migrationBuilder.DropTable( + name: "AppGroupChatBlacks"); + + migrationBuilder.DropTable( + name: "AppGroupMessages"); + + migrationBuilder.DropTable( + name: "AppNotificationDefinitionGroups"); + + migrationBuilder.DropTable( + name: "AppNotificationDefinitions"); + + migrationBuilder.DropTable( + name: "AppNotifications"); + + migrationBuilder.DropTable( + name: "AppUserChatCards"); + + migrationBuilder.DropTable( + name: "AppUserChatFriends"); + + migrationBuilder.DropTable( + name: "AppUserChatGroups"); + + migrationBuilder.DropTable( + name: "AppUserChatSettings"); + + migrationBuilder.DropTable( + name: "AppUserGroupCards"); + + migrationBuilder.DropTable( + name: "AppUserMessages"); + + migrationBuilder.DropTable( + name: "AppUserNotifications"); + + migrationBuilder.DropTable( + name: "AppUserSubscribes"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs new file mode 100644 index 000000000..f5939ac1f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs @@ -0,0 +1,734 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + [Migration("20231028084700_Upgrade-Abp-Framework-To-7.4.0")] + partial class UpgradeAbpFrameworkTo740 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Template") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs new file mode 100644 index 000000000..fdd4713b8 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs @@ -0,0 +1,330 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo740 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "AppUserMessages", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserMessages", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserMessages", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserMessages", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserGroupCards", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserGroupCards", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserGroupCards", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserGroupCards", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserChatFriends", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserChatFriends", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserChatFriends", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserChatFriends", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserChatCards", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserChatCards", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppUserChatCards", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserChatCards", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "Template", + table: "AppNotificationDefinitions", + type: "varchar(128)", + maxLength: 128, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppGroupMessages", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppGroupMessages", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppGroupMessages", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppGroupMessages", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Template", + table: "AppNotificationDefinitions"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserMessages", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserMessages", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserGroupCards", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserGroupCards", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserChatFriends", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserChatFriends", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppUserChatCards", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppUserChatCards", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppGroupMessages", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppGroupMessages", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs new file mode 100644 index 000000000..393e359c9 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs @@ -0,0 +1,734 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + [Migration("20240218002928_Modify-Notification-Name-Length")] + partial class ModifyNotificationNameLength + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Template") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs new file mode 100644 index 000000000..93725d74b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs @@ -0,0 +1,138 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + /// + public partial class ModifyNotificationNameLength : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "NotificationName", + table: "AppUserSubscribes", + type: "varchar(255)", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(100)", + oldMaxLength: 100) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "NotificationName", + table: "AppNotifications", + type: "varchar(255)", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(100)", + oldMaxLength: 100) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AppNotificationDefinitions", + type: "varchar(255)", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(64)", + oldMaxLength: 64) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "GroupName", + table: "AppNotificationDefinitions", + type: "varchar(255)", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(64)", + oldMaxLength: 64) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AppNotificationDefinitionGroups", + type: "varchar(255)", + maxLength: 255, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(64)", + oldMaxLength: 64) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "NotificationName", + table: "AppUserSubscribes", + type: "varchar(100)", + maxLength: 100, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldMaxLength: 255) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "NotificationName", + table: "AppNotifications", + type: "varchar(100)", + maxLength: 100, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldMaxLength: 255) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AppNotificationDefinitions", + type: "varchar(64)", + maxLength: 64, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldMaxLength: 255) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "GroupName", + table: "AppNotificationDefinitions", + type: "varchar(64)", + maxLength: 64, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldMaxLength: 255) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "Name", + table: "AppNotificationDefinitionGroups", + type: "varchar(64)", + maxLength: 64, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(255)", + oldMaxLength: 255) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs new file mode 100644 index 000000000..eb4138fde --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs @@ -0,0 +1,761 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + [Migration("20240729101817_Upgrade-Abp-Framework-To-8-2-0")] + partial class UpgradeAbpFrameworkTo820 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Template") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs new file mode 100644 index 000000000..37b859063 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs @@ -0,0 +1,235 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo820 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserSubscribes", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserNotifications", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserMessages", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserGroupCards", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatSettings", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatGroups", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatFriends", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatCards", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppNotifications", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppGroupMessages", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppGroupChatBlacks", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppChatGroups", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserSubscribes", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserNotifications", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserMessages", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserGroupCards", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatSettings", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatGroups", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatFriends", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppUserChatCards", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppNotifications", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppGroupMessages", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppGroupChatBlacks", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppChatGroups", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs new file mode 100644 index 000000000..3ebde47f5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs @@ -0,0 +1,814 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + [Migration("20260420065252_Upgrade-Abp-Framework-To-10-0-2")] + partial class UpgradeAbpFrameworkTo1002 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Template") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Reason") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName") + .HasDatabaseName("IX_Tenant_Send_Notification_Name"); + + b.ToTable("AppNotificationSendRecords", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs new file mode 100644 index 000000000..ff07278a9 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs @@ -0,0 +1,54 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo1002 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AppNotificationSendRecords", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Provider = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SendTime = table.Column(type: "datetime(6)", nullable: false), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") + .Annotation("MySql:CharSet", "utf8mb4"), + NotificationId = table.Column(type: "bigint", nullable: false), + NotificationName = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + State = table.Column(type: "int", nullable: false), + Reason = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppNotificationSendRecords", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_Tenant_Send_Notification_Name", + table: "AppNotificationSendRecords", + columns: new[] { "TenantId", "NotificationName" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppNotificationSendRecords"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/MessageServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/MessageServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..b7c8a4de2 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/Migrations/MessageServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,811 @@ +// +using System; +using LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(MessageServiceMigrationsDbContext))] + partial class MessageServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Age") + .HasColumnType("int"); + + b.Property("AvatarUrl") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Birthday") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastOnlineTime") + .HasColumnType("datetime(6)"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Sex") + .HasColumnType("int"); + + b.Property("Sign") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Black") + .HasColumnType("tinyint(1)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DontDisturb") + .HasColumnType("tinyint(1)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FrientId") + .HasColumnType("char(36)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("RemarkName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SpecialFocus") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("tinyint unsigned"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "FrientId"); + + b.ToTable("AppUserChatFriends", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AllowAddFriend") + .HasColumnType("tinyint(1)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowReceiveMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("RequireAddFriendValition") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserChatSettings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("ReceiveUserId") + .HasColumnType("char(36)"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ReceiveUserId"); + + b.ToTable("AppUserMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("AdminUserId") + .HasColumnType("char(36)"); + + b.Property("AllowAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("AllowSendMessage") + .HasColumnType("tinyint(1)"); + + b.Property("AvatarUrl") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MaxUserCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Notice") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Tag") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AppChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("ShieldUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupChatBlacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("MessageId") + .HasColumnType("bigint"); + + b.Property("SendUserName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId"); + + b.ToTable("AppGroupMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("GroupId") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "GroupId", "UserId"); + + b.ToTable("AppUserChatGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NickName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("SilenceEnd") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AppUserGroupCards", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationTypeName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("Severity") + .HasColumnType("tinyint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName"); + + b.ToTable("AppNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitionGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowSubscriptionToClients") + .HasColumnType("tinyint(1)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DisplayName") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("NotificationLifetime") + .HasColumnType("int"); + + b.Property("NotificationType") + .HasColumnType("int"); + + b.Property("Providers") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Template") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.ToTable("AppNotificationDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Reason") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "NotificationName") + .HasDatabaseName("IX_Tenant_Send_Notification_Name"); + + b.ToTable("AppNotificationSendRecords", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("NotificationId") + .HasColumnType("bigint"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationId") + .HasDatabaseName("IX_Tenant_User_Notification_Id"); + + b.ToTable("AppUserNotifications", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("NotificationName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasDefaultValue("/"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "UserId", "NotificationName") + .IsUnique() + .HasDatabaseName("IX_Tenant_User_Notification_Name"); + + b.ToTable("AppUserSubscribes", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..089be0a3f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.EN.md @@ -0,0 +1,71 @@ +# LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore + +Real-time Message Database Migration Module, providing database migration functionality for real-time messaging and notification systems. + +[简体中文](./README.md) + +## Features + +* Integrated SaaS multi-tenancy data migration +* Integrated Notification System data migration +* Integrated Message Service data migration +* Integrated Text Templating data migration +* Integrated Setting Management data migration +* Integrated Permission Management data migration +* Integrated Feature Management data migration +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "RealtimeMessageDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure RealtimeMessageDbMigrator connection string in appsettings.json + +2. Add Module Dependency + ```csharp + [DependsOn(typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## Database Tables Description + +* AbpNotifications - Notification system data tables +* AbpNotificationsDefinition - Notification definition data tables +* AbpMessageService - Message service data tables +* Saas Related Tables - Tenant, edition and other multi-tenancy related data +* AbpSettings - System settings data +* AbpPermissionGrants - Permission authorization data +* AbpFeatures - Feature data +* AbpTextTemplates - Text template data + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ABP Notification System Documentation](https://docs.abp.io/en/abp/latest/Notification-System) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.md new file mode 100644 index 000000000..13034032f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore/README.md @@ -0,0 +1,71 @@ +# LINGYUN.Abp.MicroService.MessageService.EntityFrameworkCore + +实时消息数据迁移模块,提供实时消息和通知系统相关的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成SaaS多租户数据迁移 +* 集成通知系统数据迁移 +* 集成消息服务数据迁移 +* 集成文本模板数据迁移 +* 集成设置管理数据迁移 +* 集成权限管理数据迁移 +* 集成特性管理数据迁移 +* 支持MySQL数据库 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "RealtimeMessageDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置RealtimeMessageDbMigrator连接字符串 + +2. 添加模块依赖 + ```csharp + [DependsOn(typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## 数据库表说明 + +* AbpNotifications - 通知系统数据表 +* AbpNotificationsDefinition - 通知定义数据表 +* AbpMessageService - 消息服务数据表 +* Saas相关表 - 租户、版本等多租户相关数据 +* AbpSettings - 系统设置数据 +* AbpPermissionGrants - 权限授权数据 +* AbpFeatures - 功能特性数据 +* AbpTextTemplates - 文本模板数据 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ABP通知系统文档](https://docs.abp.io/zh-Hans/abp/latest/Notification-System) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/LINGYUN.Abp.MicroService.PlatformService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/LINGYUN.Abp.MicroService.PlatformService.DbMigrator.csproj new file mode 100644 index 000000000..ca99ffdb7 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/LINGYUN.Abp.MicroService.PlatformService.DbMigrator.csproj @@ -0,0 +1,45 @@ + + + + + + Exe + net10.0 + enable + enable + Debug;Release + AnyCPU + false + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..1ab3f58c5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorHostedService.cs @@ -0,0 +1,55 @@ +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.PlatformService.DbMigrator; + +public class PlatformServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public PlatformServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(PlatformServiceDbMigratorHostedService).Assembly; + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..d999287df --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.PlatformService.DbMigrator; +public partial class PlatformServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.cs new file mode 100644 index 000000000..19e0adfea --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/PlatformServiceDbMigratorModule.cs @@ -0,0 +1,13 @@ +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.PlatformService.DbMigrator; + +[DependsOn( + typeof(PlatformServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) + )] +public partial class PlatformServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Program.cs new file mode 100644 index 000000000..efe770dba --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Program.cs @@ -0,0 +1,39 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.PlatformService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.PlatformService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.PlatformService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..3da223a7a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LY.MicroService.Platform.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/README.EN.md similarity index 100% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/README.EN.md rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/README.EN.md diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/README.md similarity index 100% rename from aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/README.md rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/README.md diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..32ccff903 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.csproj @@ -0,0 +1,31 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs new file mode 100644 index 000000000..0e7061e96 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs @@ -0,0 +1,772 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20230110015904_Initial-Platform")] + partial class InitialPlatform + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs new file mode 100644 index 000000000..b97852c51 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs @@ -0,0 +1,399 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialPlatform : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformDatas", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Code = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsStatic = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformDatas", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformLayouts", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformLayouts", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformMenus", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Code = table.Column(type: "varchar(23)", maxLength: 23, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Component = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LayoutId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + IsPublic = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformMenus", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformPackages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Note = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Version = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ForceUpdate = table.Column(type: "tinyint(1)", nullable: false), + Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Level = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformPackages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformRoleMenus", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + RoleName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Startup = table.Column(type: "tinyint(1)", nullable: false), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformRoleMenus", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformUserFavoriteMenus", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + AliasName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Color = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Icon = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformUserFavoriteMenus", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformUserMenus", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Startup = table.Column(type: "tinyint(1)", nullable: false), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformUserMenus", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformDataItems", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DefaultValue = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + AllowBeNull = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), + IsStatic = table.Column(type: "tinyint(1)", nullable: false), + ValueType = table.Column(type: "int", nullable: false), + DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformDataItems", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformDataItems_AppPlatformDatas_DataId", + column: x => x.DataId, + principalTable: "AppPlatformDatas", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformPackageBlobs", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + PackageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Url = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Size = table.Column(type: "bigint", nullable: true), + Summary = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreatedAt = table.Column(type: "datetime(6)", nullable: false), + UpdatedAt = table.Column(type: "datetime(6)", nullable: true), + License = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ContentType = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SHA256 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + DownloadCount = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformPackageBlobs", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformPackageBlobs_AppPlatformPackages_PackageId", + column: x => x.PackageId, + principalTable: "AppPlatformPackages", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformDataItems_DataId", + table: "AppPlatformDataItems", + column: "DataId"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformDataItems_Name", + table: "AppPlatformDataItems", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformDatas_Name", + table: "AppPlatformDatas", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformPackageBlobs_PackageId_Name", + table: "AppPlatformPackageBlobs", + columns: new[] { "PackageId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformPackages_Name_Version", + table: "AppPlatformPackages", + columns: new[] { "Name", "Version" }); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformRoleMenus_RoleName_MenuId", + table: "AppPlatformRoleMenus", + columns: new[] { "RoleName", "MenuId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformUserFavoriteMenus_UserId_MenuId", + table: "AppPlatformUserFavoriteMenus", + columns: new[] { "UserId", "MenuId" }); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformUserMenus_UserId_MenuId", + table: "AppPlatformUserMenus", + columns: new[] { "UserId", "MenuId" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppPlatformDataItems"); + + migrationBuilder.DropTable( + name: "AppPlatformLayouts"); + + migrationBuilder.DropTable( + name: "AppPlatformMenus"); + + migrationBuilder.DropTable( + name: "AppPlatformPackageBlobs"); + + migrationBuilder.DropTable( + name: "AppPlatformRoleMenus"); + + migrationBuilder.DropTable( + name: "AppPlatformUserFavoriteMenus"); + + migrationBuilder.DropTable( + name: "AppPlatformUserMenus"); + + migrationBuilder.DropTable( + name: "AppPlatformDatas"); + + migrationBuilder.DropTable( + name: "AppPlatformPackages"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs new file mode 100644 index 000000000..c91febacb --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs @@ -0,0 +1,868 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20230506071509_Add-Portal-Login")] + partial class AddPortalLogin + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs new file mode 100644 index 000000000..cd129dbbe --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs @@ -0,0 +1,62 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddPortalLogin : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AppPlatformEnterprises", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + EnglishName = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Address = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + LegalMan = table.Column(type: "varchar(60)", maxLength: 60, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + TaxCode = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + OrganizationCode = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RegistrationCode = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RegistrationDate = table.Column(type: "datetime(6)", nullable: true), + ExpirationDate = table.Column(type: "datetime(6)", nullable: true), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformEnterprises", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppPlatformEnterprises"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs new file mode 100644 index 000000000..045e90f93 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs @@ -0,0 +1,873 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20230509024453_Add-Logo-Property-With-Portal")] + partial class AddLogoPropertyWithPortal + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs new file mode 100644 index 000000000..cc4dc6f71 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddLogoPropertyWithPortal : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Logo", + table: "AppPlatformEnterprises", + type: "varchar(512)", + maxLength: 512, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Logo", + table: "AppPlatformEnterprises"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs new file mode 100644 index 000000000..81b2449bd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs @@ -0,0 +1,885 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20231028084601_Upgrade-Abp-Framework-To-7.4.0")] + partial class UpgradeAbpFrameworkTo740 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs new file mode 100644 index 000000000..32e304027 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs @@ -0,0 +1,378 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo740 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "AppPlatformPackages", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformPackages", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformPackages", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformPackages", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformMenus", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformMenus", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformMenus", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformMenus", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformLayouts", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformLayouts", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformLayouts", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformLayouts", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformEnterprises", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformEnterprises", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformEnterprises", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformEnterprises", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformDatas", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformDatas", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformDatas", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformDatas", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformDataItems", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformDataItems", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "AppPlatformDataItems", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformDataItems", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformPackages", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformPackages", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformMenus", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformMenus", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformLayouts", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformLayouts", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformEnterprises", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformEnterprises", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformDatas", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformDatas", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AppPlatformDataItems", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AppPlatformDataItems", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs new file mode 100644 index 000000000..fcd606375 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs @@ -0,0 +1,882 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20240729101742_Upgrade-Abp-Framework-To-8-2-0")] + partial class UpgradeAbpFrameworkTo820 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs new file mode 100644 index 000000000..2c00aa791 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs @@ -0,0 +1,60 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo820 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TenantId", + table: "AppPlatformPackages"); + + migrationBuilder.DropColumn( + name: "TenantId", + table: "AppPlatformPackageBlobs"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppPlatformPackageBlobs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TenantId", + table: "AppPlatformPackages", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + + migrationBuilder.AlterColumn( + name: "Id", + table: "AppPlatformPackageBlobs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AddColumn( + name: "TenantId", + table: "AppPlatformPackageBlobs", + type: "char(36)", + nullable: true, + collation: "ascii_general_ci"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs new file mode 100644 index 000000000..5a295a73f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs @@ -0,0 +1,1070 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20241114072749_Add-Feedback")] + partial class AddFeedback + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Category"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformFeedbacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Capacity"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackComments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Attachments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Comments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Navigation("Attachments"); + + b.Navigation("Comments"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs new file mode 100644 index 000000000..db677e9bf --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs @@ -0,0 +1,122 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddFeedback : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AppPlatformFeedbacks", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Content = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Category = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformFeedbacks", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformFeedbackAttachments", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Url = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Size = table.Column(type: "bigint", nullable: false), + FeedbackId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformFeedbackAttachments", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformFeedbackAttachments_AppPlatformFeedbacks_Feedback~", + column: x => x.FeedbackId, + principalTable: "AppPlatformFeedbacks", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformFeedbackComments", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Capacity = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FeedbackId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformFeedbackComments", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformFeedbackComments_AppPlatformFeedbacks_FeedbackId", + column: x => x.FeedbackId, + principalTable: "AppPlatformFeedbacks", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformFeedbackAttachments_FeedbackId", + table: "AppPlatformFeedbackAttachments", + column: "FeedbackId"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformFeedbackComments_FeedbackId", + table: "AppPlatformFeedbackComments", + column: "FeedbackId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppPlatformFeedbackAttachments"); + + migrationBuilder.DropTable( + name: "AppPlatformFeedbackComments"); + + migrationBuilder.DropTable( + name: "AppPlatformFeedbacks"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs new file mode 100644 index 000000000..0f6b2dbcf --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs @@ -0,0 +1,1342 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20250226010532_Add-Message-Center")] + partial class AddMessageCenter + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "9.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Category"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformFeedbacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Capacity"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackComments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BodyTransferEncoding") + .HasColumnType("int"); + + b.Property("CC") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("CC"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeliveryNotificationOptions") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("From") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("From"); + + b.Property("IsBodyHtml") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Normalize") + .HasColumnType("tinyint(1)"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Subject") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Subject"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEmailMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("BlobName"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Key"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageHeaders", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformSmsMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Attachments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Comments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Attachments") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Headers") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Navigation("Attachments"); + + b.Navigation("Comments"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Navigation("Attachments"); + + b.Navigation("Headers"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs new file mode 100644 index 000000000..a52a0f791 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs @@ -0,0 +1,170 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddMessageCenter : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AppPlatformEmailMessages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + From = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Subject = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsBodyHtml = table.Column(type: "tinyint(1)", nullable: false), + CC = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Normalize = table.Column(type: "tinyint(1)", nullable: false), + Priority = table.Column(type: "int", nullable: true), + BodyTransferEncoding = table.Column(type: "int", nullable: true), + DeliveryNotificationOptions = table.Column(type: "int", nullable: true), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Sender = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Receiver = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SendTime = table.Column(type: "datetime(6)", nullable: true), + SendCount = table.Column(type: "int", nullable: false), + Status = table.Column(type: "int", nullable: false), + Reason = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformEmailMessages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformSmsMessages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Sender = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Receiver = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Content = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SendTime = table.Column(type: "datetime(6)", nullable: true), + SendCount = table.Column(type: "int", nullable: false), + Status = table.Column(type: "int", nullable: false), + Reason = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformSmsMessages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformEmailMessageAttachments", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + MessageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BlobName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Size = table.Column(type: "bigint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformEmailMessageAttachments", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformEmailMessageAttachments_AppPlatformEmailMessages_~", + column: x => x.MessageId, + principalTable: "AppPlatformEmailMessages", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AppPlatformEmailMessageHeaders", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + MessageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Key = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AppPlatformEmailMessageHeaders", x => x.Id); + table.ForeignKey( + name: "FK_AppPlatformEmailMessageHeaders_AppPlatformEmailMessages_Mess~", + column: x => x.MessageId, + principalTable: "AppPlatformEmailMessages", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformEmailMessageAttachments_MessageId", + table: "AppPlatformEmailMessageAttachments", + column: "MessageId"); + + migrationBuilder.CreateIndex( + name: "IX_AppPlatformEmailMessageHeaders_MessageId", + table: "AppPlatformEmailMessageHeaders", + column: "MessageId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AppPlatformEmailMessageAttachments"); + + migrationBuilder.DropTable( + name: "AppPlatformEmailMessageHeaders"); + + migrationBuilder.DropTable( + name: "AppPlatformSmsMessages"); + + migrationBuilder.DropTable( + name: "AppPlatformEmailMessages"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs new file mode 100644 index 000000000..4b175ee89 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs @@ -0,0 +1,1501 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + [Migration("20260424033808_Add-Blob-Management-Module")] + partial class AddBlobManagementModule + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("char(36)"); + + b.Property("ContentType") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("bigint"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TenantId", "ContainerId", "FullName"); + + b.ToTable("AbpBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.BlobContainer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Category"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformFeedbacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Capacity"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackComments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BodyTransferEncoding") + .HasColumnType("int"); + + b.Property("CC") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("CC"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeliveryNotificationOptions") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("From") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("From"); + + b.Property("IsBodyHtml") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Normalize") + .HasColumnType("tinyint(1)"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Subject") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Subject"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEmailMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("BlobName"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Key"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageHeaders", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformSmsMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.HasOne("LINGYUN.Abp.BlobManagement.BlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("LINGYUN.Abp.BlobManagement.Blob", null) + .WithMany("Blobs") + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Attachments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Comments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Attachments") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Headers") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.Navigation("Blobs"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Navigation("Attachments"); + + b.Navigation("Comments"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Navigation("Attachments"); + + b.Navigation("Headers"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs new file mode 100644 index 000000000..4a0ee6579 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs @@ -0,0 +1,116 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddBlobManagementModule : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpBlobContainers", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Provider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpBlobs", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ContainerId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "int", nullable: false), + ContentType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Size = table.Column(type: "bigint", nullable: false), + ExpirationTime = table.Column(type: "datetime(6)", nullable: true), + Provider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DownloadCount = table.Column(type: "bigint", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBlobs", x => x.Id); + table.ForeignKey( + name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", + column: x => x.ContainerId, + principalTable: "AbpBlobContainers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpBlobs_AbpBlobs_ParentId", + column: x => x.ParentId, + principalTable: "AbpBlobs", + principalColumn: "Id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobContainers_TenantId_Name", + table: "AbpBlobContainers", + columns: new[] { "TenantId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_ContainerId", + table: "AbpBlobs", + column: "ContainerId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_ParentId", + table: "AbpBlobs", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_TenantId_ContainerId_FullName", + table: "AbpBlobs", + columns: new[] { "TenantId", "ContainerId", "FullName" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpBlobs"); + + migrationBuilder.DropTable( + name: "AbpBlobContainers"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/PlatformServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/PlatformServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..aa96e3f32 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/Migrations/PlatformServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,1498 @@ +// +using System; +using LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(PlatformServiceMigrationsDbContext))] + partial class PlatformServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerId") + .HasColumnType("char(36)"); + + b.Property("ContentType") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("bigint"); + + b.Property("ExpirationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FullName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ContainerId"); + + b.HasIndex("ParentId"); + + b.HasIndex("TenantId", "ContainerId", "FullName"); + + b.ToTable("AbpBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.BlobContainer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("AbpBlobContainers", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDatas", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowBeNull") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DefaultValue"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Description"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataId"); + + b.HasIndex("Name"); + + b.ToTable("AppPlatformDataItems", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Category"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformFeedbacks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Capacity"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("FeedbackId") + .HasColumnType("char(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("FeedbackId"); + + b.ToTable("AppPlatformFeedbackComments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataId") + .HasColumnType("char(36)"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformLayouts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(23) + .HasColumnType("varchar(23)") + .HasColumnName("Code"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Component"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LayoutId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("Redirect") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Redirect"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("RoleName"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleName", "MenuId"); + + b.ToTable("AppPlatformRoleMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AliasName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("AliasName"); + + b.Property("Color") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Color"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("Framework") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Framework"); + + b.Property("Icon") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Icon"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Path"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserFavoriteMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MenuId") + .HasColumnType("char(36)"); + + b.Property("Startup") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "MenuId"); + + b.ToTable("AppPlatformUserMenus", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BodyTransferEncoding") + .HasColumnType("int"); + + b.Property("CC") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("CC"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeliveryNotificationOptions") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("From") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("From"); + + b.Property("IsBodyHtml") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Normalize") + .HasColumnType("tinyint(1)"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Subject") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Subject"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEmailMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("BlobName"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Name"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageAttachments", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Key") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Key"); + + b.Property("MessageId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Value"); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.ToTable("AppPlatformEmailMessageHeaders", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Provider"); + + b.Property("Reason") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Reason"); + + b.Property("Receiver") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Receiver"); + + b.Property("SendCount") + .HasColumnType("int"); + + b.Property("SendTime") + .HasColumnType("datetime(6)"); + + b.Property("Sender") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Sender"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformSmsMessages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("ForceUpdate") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Note"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Version"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Version"); + + b.ToTable("AppPlatformPackages", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Authors") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Authors"); + + b.Property("ContentType") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ContentType"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DownloadCount") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("License") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("License"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("PackageId") + .HasColumnType("char(36)"); + + b.Property("SHA256") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SHA256"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("Summary") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)") + .HasColumnName("Summary"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Url"); + + b.HasKey("Id"); + + b.HasIndex("PackageId", "Name"); + + b.ToTable("AppPlatformPackageBlobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Address"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("EnglishName") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("EnglishName"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LegalMan") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("LegalMan"); + + b.Property("Logo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("Logo"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Name"); + + b.Property("OrganizationCode") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("OrganizationCode"); + + b.Property("RegistrationCode") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RegistrationCode"); + + b.Property("RegistrationDate") + .HasColumnType("datetime(6)"); + + b.Property("TaxCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("TaxCode"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.ToTable("AppPlatformEnterprises", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.HasOne("LINGYUN.Abp.BlobManagement.BlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("LINGYUN.Abp.BlobManagement.Blob", null) + .WithMany("Blobs") + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => + { + b.HasOne("LINGYUN.Platform.Datas.Data", null) + .WithMany("Items") + .HasForeignKey("DataId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Attachments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => + { + b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) + .WithMany("Comments") + .HasForeignKey("FeedbackId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Attachments") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => + { + b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) + .WithMany("Headers") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => + { + b.HasOne("LINGYUN.Platform.Packages.Package", "Package") + .WithMany("Blobs") + .HasForeignKey("PackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Package"); + }); + + modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => + { + b.Navigation("Blobs"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => + { + b.Navigation("Attachments"); + + b.Navigation("Comments"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => + { + b.Navigation("Attachments"); + + b.Navigation("Headers"); + }); + + modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => + { + b.Navigation("Blobs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDataSeeder.cs new file mode 100644 index 000000000..da133fcbf --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDataSeeder.cs @@ -0,0 +1,43 @@ +using LINGYUN.Abp.BlobManagement; +using LINGYUN.Abp.UI.Navigation; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; + +public class PlatformServiceDataSeeder : ITransientDependency +{ + protected NavigationDataSeeder NavigationDataSeeder { get; } + protected IBlobDataSeeder BlobDataSeeder { get; } + protected ICurrentTenant CurrentTenant { get; } + public PlatformServiceDataSeeder( + NavigationDataSeeder navigationDataSeeder, + ICurrentTenant currentTenant, + IBlobDataSeeder blobDataSeeder) + { + NavigationDataSeeder = navigationDataSeeder; + CurrentTenant = currentTenant; + BlobDataSeeder = blobDataSeeder; + } + + public async virtual Task SeedAsync(DataSeedContext context) + { + using (CurrentTenant.Change(context.TenantId)) + { + await SeedNavigationAsync(); + await SeedBlobContainerAsync(); + } + } + + private async Task SeedNavigationAsync() + { + await NavigationDataSeeder.SeedAsync(CurrentTenant.Id); + } + + private async Task SeedBlobContainerAsync() + { + await BlobDataSeeder.SeedAsync(CurrentTenant.Id); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..286b7213a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationEventHandler.cs @@ -0,0 +1,91 @@ +using LINGYUN.Abp.Saas.Tenants; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using System; +using System.Data.Common; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; +public class PlatformServiceDbMigrationEventHandler : + EfCoreDatabaseMigrationEventHandlerBase, + IDistributedEventHandler +{ + protected PlatformServiceDataSeeder DataSeeder { get; } + protected IConfiguration Configuration { get; } + public PlatformServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + PlatformServiceDataSeeder dataSeeder, + IConfiguration configuration) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + Configuration = configuration; + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + using (CurrentTenant.Change(eventData.Id)) + { + using (var uow = UnitOfWorkManager.Begin(requiresNew: true)) + { + var seedContext = new DataSeedContext(eventData.Id); + foreach (var prop in eventData.Properties) + { + seedContext.WithProperty(prop.Key, prop.Value); + } + + await DataSeeder.SeedAsync(seedContext); + + await uow.CompleteAsync(); + } + } + } + + public async virtual Task HandleEventAsync(TenantDeletedEto eventData) + { + var hostDefaultConnectionString = Configuration.GetConnectionString(ConnectionStrings.DefaultConnectionStringName); + using (CurrentTenant.Change(eventData.Id)) + { + // 需要回收策略为回收且存在默认连接字符串且默认连接字符串与宿主不同 + if (eventData.Strategy == RecycleStrategy.Recycle && !eventData.DefaultConnectionString.IsNullOrWhiteSpace()) + { + var hostConnection = new DbConnectionStringBuilder() + { + ConnectionString = hostDefaultConnectionString, + }; + var tenantConnection = new DbConnectionStringBuilder() + { + ConnectionString = eventData.DefaultConnectionString, + }; + if (hostConnection.EquivalentTo(tenantConnection)) + { + return; + } + + using var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true); + var buildr = new DbContextOptionsBuilder(); + buildr.UseMySql(eventData.DefaultConnectionString, ServerVersion.AutoDetect(eventData.DefaultConnectionString)); + await using var dbConnection = new DbContext(buildr.Options); + if ((await dbConnection.Database.GetAppliedMigrationsAsync()).Any()) + { + await dbConnection.Database.EnsureDeletedAsync(); + } + } + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationService.cs new file mode 100644 index 000000000..1f005c899 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceDbMigrationService.cs @@ -0,0 +1,38 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; + +public class PlatformServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + protected PlatformServiceDataSeeder DataSeeder { get; } + + public PlatformServiceDbMigrationService( + PlatformServiceDataSeeder dataSeeder, + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + protected async override Task SeedAsync() + { + // DbMigrator迁移数据种子 + await DataSeeder.SeedAsync(new DataSeedContext()); + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContext.cs new file mode 100644 index 000000000..aca778d5b --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContext.cs @@ -0,0 +1,25 @@ +using LINGYUN.Abp.BlobManagement.EntityFrameworkCore; +using LINGYUN.Platform.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; + +[ConnectionStringName("PlatformDbMigrator")] +public class PlatformServiceMigrationsDbContext : AbpDbContext +{ + public PlatformServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigurePlatform(); + modelBuilder.ConfigureBlobManagement(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..d9d20f537 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; + +public class PlatformServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public PlatformServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new PlatformServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.PlatformService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..b7f97fd37 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/PlatformServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,44 @@ +using LINGYUN.Abp.BlobManagement.EntityFrameworkCore; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.UI.Navigation.VueVbenAdmin5; +using LINGYUN.Platform.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpUINavigationVueVbenAdmin5Module), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(PlatformEntityFrameworkCoreModule), + typeof(AbpBlobManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpDataDbMigratorModule) + )] +public class PlatformServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/README.EN.md similarity index 100% rename from aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/README.EN.md rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/README.EN.md diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/README.md similarity index 100% rename from aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/README.md rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.PlatformService.EntityFrameworkCore/README.md diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/LINGYUN.Abp.MicroService.TaskService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/LINGYUN.Abp.MicroService.TaskService.DbMigrator.csproj new file mode 100644 index 000000000..dafd1e57c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/LINGYUN.Abp.MicroService.TaskService.DbMigrator.csproj @@ -0,0 +1,35 @@ + + + + + + Exe + net10.0 + enable + enable + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Program.cs new file mode 100644 index 000000000..a5acd0c41 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.TaskService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.TaskService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.TaskService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..4d5f93caf --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.TaskService.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.EN.md new file mode 100644 index 000000000..cba26420c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.EN.md @@ -0,0 +1,65 @@ +# LINGYUN.Abp.MicroService.TaskService.DbMigrator + +Task Management Database Migration Console Application, used for executing database migrations and initializing seed data for the task management system. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Inherit all migration features from task management system + +## Module Dependencies + +```csharp +[DependsOn( + typeof(TaskManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "TaskManagementDbMigrator": "Your database connection string" + }, + "IdentityServer": { + "Clients": { + "TaskManagement_App": { + "ClientId": "TaskManagement_App" + } + } + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure TaskManagementDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.md new file mode 100644 index 000000000..b06d22ea5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/README.md @@ -0,0 +1,65 @@ +# LINGYUN.Abp.MicroService.TaskService.DbMigrator + +任务管理数据库迁移控制台应用程序,用于执行任务管理系统的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 继承任务管理系统的所有迁移功能 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(TaskManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "TaskManagementDbMigrator": "你的数据库连接字符串" + }, + "IdentityServer": { + "Clients": { + "TaskManagement_App": { + "ClientId": "TaskManagement_App" + } + } + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置TaskManagementDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..5212e8167 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorHostedService.cs @@ -0,0 +1,51 @@ +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.TaskService.DbMigrator; + +public class TaskServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public TaskServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..00bd39675 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.TaskService.DbMigrator; +public partial class TaskServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.cs new file mode 100644 index 000000000..d8dc10d80 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/TaskServiceDbMigratorModule.cs @@ -0,0 +1,13 @@ +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.TaskService.DbMigrator; + +[DependsOn( + typeof(TaskServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) + )] +public partial class TaskServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.PostgreSql.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/appsettings.PostgreSql.json similarity index 100% rename from aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.PostgreSql.json rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/appsettings.PostgreSql.json diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..55d1f7ad0 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.csproj @@ -0,0 +1,29 @@ + + + + + + + net10.0 + LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs new file mode 100644 index 000000000..dc89a3d44 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs @@ -0,0 +1,273 @@ +// +using System; +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(TaskServiceMigrationsDbContext))] + [Migration("20230112021621_Initial-Task-Management")] + partial class InitialTaskManagement + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("Paramters") + .HasColumnType("longtext") + .HasColumnName("Paramters"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("TK_BackgroundJobActions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Args") + .HasColumnType("longtext") + .HasColumnName("Args"); + + b.Property("BeginTime") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Cron"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Group"); + + b.Property("Interval") + .HasColumnType("int"); + + b.Property("IsAbandoned") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRunTime") + .HasColumnType("datetime(6)"); + + b.Property("LockTimeOut") + .HasColumnType("int"); + + b.Property("MaxCount") + .HasColumnType("int"); + + b.Property("MaxTryCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("NextRunTime") + .HasColumnType("datetime(6)"); + + b.Property("NodeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("NodeName"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Result"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TriggerCount") + .HasColumnType("int"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Type"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Group"); + + b.ToTable("TK_BackgroundJobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Exception") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Exception"); + + b.Property("JobGroup") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("JobGroup"); + + b.Property("JobId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("JobName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobName"); + + b.Property("JobType") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("JobType"); + + b.Property("Message") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Message"); + + b.Property("RunTime") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("JobGroup", "JobName"); + + b.ToTable("TK_BackgroundJobLogs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs new file mode 100644 index 000000000..8574f73b6 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs @@ -0,0 +1,156 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialTaskManagement : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "TK_BackgroundJobActions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + JobId = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + Paramters = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_TK_BackgroundJobActions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "TK_BackgroundJobLogs", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + JobId = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + JobName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + JobGroup = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + JobType = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Message = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + RunTime = table.Column(type: "datetime(6)", nullable: false), + Exception = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_TK_BackgroundJobLogs", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "TK_BackgroundJobs", + columns: table => new + { + Id = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Group = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Result = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Args = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "int", nullable: false), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + LockTimeOut = table.Column(type: "int", nullable: false), + BeginTime = table.Column(type: "datetime(6)", nullable: false), + EndTime = table.Column(type: "datetime(6)", nullable: true), + LastRunTime = table.Column(type: "datetime(6)", nullable: true), + NextRunTime = table.Column(type: "datetime(6)", nullable: true), + JobType = table.Column(type: "int", nullable: false), + Cron = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Source = table.Column(type: "int", nullable: false), + Priority = table.Column(type: "int", nullable: false), + TriggerCount = table.Column(type: "int", nullable: false), + TryCount = table.Column(type: "int", nullable: false), + MaxTryCount = table.Column(type: "int", nullable: false), + MaxCount = table.Column(type: "int", nullable: false), + Interval = table.Column(type: "int", nullable: false), + IsAbandoned = table.Column(type: "tinyint(1)", nullable: false), + NodeName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_TK_BackgroundJobs", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_TK_BackgroundJobActions_Name", + table: "TK_BackgroundJobActions", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_TK_BackgroundJobLogs_JobGroup_JobName", + table: "TK_BackgroundJobLogs", + columns: new[] { "JobGroup", "JobName" }); + + migrationBuilder.CreateIndex( + name: "IX_TK_BackgroundJobs_Name_Group", + table: "TK_BackgroundJobs", + columns: new[] { "Name", "Group" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TK_BackgroundJobActions"); + + migrationBuilder.DropTable( + name: "TK_BackgroundJobLogs"); + + migrationBuilder.DropTable( + name: "TK_BackgroundJobs"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs new file mode 100644 index 000000000..683d0121a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs @@ -0,0 +1,273 @@ +// +using System; +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(TaskServiceMigrationsDbContext))] + [Migration("20230330025320_Modify-Job-Group-Length")] + partial class ModifyJobGroupLength + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("Paramters") + .HasColumnType("longtext") + .HasColumnName("Paramters"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("TK_BackgroundJobActions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Args") + .HasColumnType("longtext") + .HasColumnName("Args"); + + b.Property("BeginTime") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Cron"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Group"); + + b.Property("Interval") + .HasColumnType("int"); + + b.Property("IsAbandoned") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRunTime") + .HasColumnType("datetime(6)"); + + b.Property("LockTimeOut") + .HasColumnType("int"); + + b.Property("MaxCount") + .HasColumnType("int"); + + b.Property("MaxTryCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("NextRunTime") + .HasColumnType("datetime(6)"); + + b.Property("NodeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("NodeName"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Result"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TriggerCount") + .HasColumnType("int"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Type"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Group"); + + b.ToTable("TK_BackgroundJobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Exception") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Exception"); + + b.Property("JobGroup") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobGroup"); + + b.Property("JobId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("JobName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobName"); + + b.Property("JobType") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("JobType"); + + b.Property("Message") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Message"); + + b.Property("RunTime") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("JobGroup", "JobName"); + + b.ToTable("TK_BackgroundJobLogs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs new file mode 100644 index 000000000..3db2f0c5f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs @@ -0,0 +1,68 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + /// + public partial class ModifyJobGroupLength : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Group", + table: "TK_BackgroundJobs", + type: "varchar(100)", + maxLength: 100, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(50)", + oldMaxLength: 50) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "JobGroup", + table: "TK_BackgroundJobLogs", + type: "varchar(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(50)", + oldMaxLength: 50, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Group", + table: "TK_BackgroundJobs", + type: "varchar(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(100)", + oldMaxLength: 100) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "JobGroup", + table: "TK_BackgroundJobLogs", + type: "varchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(100)", + oldMaxLength: 100, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs new file mode 100644 index 000000000..3e58341a3 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs @@ -0,0 +1,277 @@ +// +using System; +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(TaskServiceMigrationsDbContext))] + [Migration("20231028084851_Upgrade-Abp-Framework-To-7.4.0")] + partial class UpgradeAbpFrameworkTo740 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("Paramters") + .HasColumnType("longtext") + .HasColumnName("Paramters"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("TK_BackgroundJobActions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Args") + .HasColumnType("longtext") + .HasColumnName("Args"); + + b.Property("BeginTime") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Cron"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Group"); + + b.Property("Interval") + .HasColumnType("int"); + + b.Property("IsAbandoned") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRunTime") + .HasColumnType("datetime(6)"); + + b.Property("LockTimeOut") + .HasColumnType("int"); + + b.Property("MaxCount") + .HasColumnType("int"); + + b.Property("MaxTryCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("NextRunTime") + .HasColumnType("datetime(6)"); + + b.Property("NodeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("NodeName"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Result"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TriggerCount") + .HasColumnType("int"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Type"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Group"); + + b.ToTable("TK_BackgroundJobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Exception") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Exception"); + + b.Property("JobGroup") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobGroup"); + + b.Property("JobId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("JobName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobName"); + + b.Property("JobType") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("JobType"); + + b.Property("Message") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Message"); + + b.Property("RunTime") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("JobGroup", "JobName"); + + b.ToTable("TK_BackgroundJobLogs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs new file mode 100644 index 000000000..3e6f53b43 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs @@ -0,0 +1,138 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo740 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "TK_BackgroundJobs", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "TK_BackgroundJobs", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "TK_BackgroundJobs", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "TK_BackgroundJobs", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "TK_BackgroundJobActions", + keyColumn: "ExtraProperties", + keyValue: null, + column: "ExtraProperties", + value: ""); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "TK_BackgroundJobActions", + type: "longtext", + nullable: false, + oldClrType: typeof(string), + oldType: "longtext", + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "TK_BackgroundJobActions", + keyColumn: "ConcurrencyStamp", + keyValue: null, + column: "ConcurrencyStamp", + value: ""); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "TK_BackgroundJobActions", + type: "varchar(40)", + maxLength: 40, + nullable: false, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40, + oldNullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "TK_BackgroundJobs", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "TK_BackgroundJobs", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "TK_BackgroundJobActions", + type: "longtext", + nullable: true, + oldClrType: typeof(string), + oldType: "longtext") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "TK_BackgroundJobActions", + type: "varchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "varchar(40)", + oldMaxLength: 40) + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs new file mode 100644 index 000000000..71ea91c7e --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs @@ -0,0 +1,282 @@ +// +using System; +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(TaskServiceMigrationsDbContext))] + [Migration("20260420073543_Upgrade-Abp-Framework-To-10-0-2")] + partial class UpgradeAbpFrameworkTo1002 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("Paramters") + .HasColumnType("longtext") + .HasColumnName("Paramters"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("TK_BackgroundJobActions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Args") + .HasColumnType("longtext") + .HasColumnName("Args"); + + b.Property("BeginTime") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Cron"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Group"); + + b.Property("Interval") + .HasColumnType("int"); + + b.Property("IsAbandoned") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRunTime") + .HasColumnType("datetime(6)"); + + b.Property("LockTimeOut") + .HasColumnType("int"); + + b.Property("MaxCount") + .HasColumnType("int"); + + b.Property("MaxTryCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("NextRunTime") + .HasColumnType("datetime(6)"); + + b.Property("NodeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("NodeName"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Result"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TriggerCount") + .HasColumnType("int"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Type"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Group"); + + b.ToTable("TK_BackgroundJobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Exception") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Exception"); + + b.Property("JobGroup") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobGroup"); + + b.Property("JobId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("JobName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobName"); + + b.Property("JobType") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("JobType"); + + b.Property("Message") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Message"); + + b.Property("RunTime") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("JobGroup", "JobName"); + + b.ToTable("TK_BackgroundJobLogs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs new file mode 100644 index 000000000..0138dd852 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs @@ -0,0 +1,37 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo1002 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Id", + table: "TK_BackgroundJobLogs", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Id", + table: "TK_BackgroundJobLogs", + type: "bigint", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/TaskServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/TaskServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..4493d0760 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/Migrations/TaskServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,279 @@ +// +using System; +using LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(TaskServiceMigrationsDbContext))] + partial class TaskServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "10.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobId") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("Paramters") + .HasColumnType("longtext") + .HasColumnName("Paramters"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("TK_BackgroundJobActions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => + { + b.Property("Id") + .HasColumnType("varchar(255)"); + + b.Property("Args") + .HasColumnType("longtext") + .HasColumnName("Args"); + + b.Property("BeginTime") + .HasColumnType("datetime(6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Cron") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("Cron"); + + b.Property("Description") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("Description"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Group"); + + b.Property("Interval") + .HasColumnType("int"); + + b.Property("IsAbandoned") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("JobType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRunTime") + .HasColumnType("datetime(6)"); + + b.Property("LockTimeOut") + .HasColumnType("int"); + + b.Property("MaxCount") + .HasColumnType("int"); + + b.Property("MaxTryCount") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("NextRunTime") + .HasColumnType("datetime(6)"); + + b.Property("NodeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("NodeName"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Result"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TriggerCount") + .HasColumnType("int"); + + b.Property("TryCount") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Type"); + + b.HasKey("Id"); + + b.HasIndex("Name", "Group"); + + b.ToTable("TK_BackgroundJobs", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Exception") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Exception"); + + b.Property("JobGroup") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobGroup"); + + b.Property("JobId") + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("JobId"); + + b.Property("JobName") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("JobName"); + + b.Property("JobType") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("JobType"); + + b.Property("Message") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)") + .HasColumnName("Message"); + + b.Property("RunTime") + .HasColumnType("datetime(6)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("JobGroup", "JobName"); + + b.ToTable("TK_BackgroundJobLogs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..b23dea53f --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.EN.md @@ -0,0 +1,68 @@ +# LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore + +Task Management Database Migration Module, providing database migration functionality for the task management system. + +[简体中文](./README.md) + +## Features + +* Integrated SaaS multi-tenancy data migration +* Integrated Task Management data migration +* Integrated Setting Management data migration +* Integrated Permission Management data migration +* Integrated Feature Management data migration +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "TaskManagementDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure TaskManagementDbMigrator connection string in appsettings.json + +2. Add Module Dependency + ```csharp + [DependsOn(typeof(TaskManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## Database Tables Description + +* AbpTasks - Task basic information table +* AbpTaskCategories - Task categories table +* AbpTaskStatuses - Task statuses table +* AbpTaskAssignments - Task assignments table +* Saas Related Tables - Tenant, edition and other multi-tenancy related data +* AbpSettings - System settings data +* AbpPermissionGrants - Permission authorization data +* AbpFeatures - Feature data + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ABP Task Management Module](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/task-management) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.md new file mode 100644 index 000000000..66351873c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/README.md @@ -0,0 +1,68 @@ +# LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore + +任务管理数据迁移模块,提供任务管理系统相关的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成SaaS多租户数据迁移 +* 集成任务管理数据迁移 +* 集成设置管理数据迁移 +* 集成权限管理数据迁移 +* 集成特性管理数据迁移 +* 支持MySQL数据库 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "TaskManagementDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置TaskManagementDbMigrator连接字符串 + +2. 添加模块依赖 + ```csharp + [DependsOn(typeof(TaskManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## 数据库表说明 + +* AbpTasks - 任务基本信息表 +* AbpTaskCategories - 任务分类表 +* AbpTaskStatuses - 任务状态表 +* AbpTaskAssignments - 任务分配表 +* Saas相关表 - 租户、版本等多租户相关数据 +* AbpSettings - 系统设置数据 +* AbpPermissionGrants - 权限授权数据 +* AbpFeatures - 功能特性数据 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ABP任务管理模块](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/task-management) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDataSeeder.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDataSeeder.cs new file mode 100644 index 000000000..6e471f96e --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDataSeeder.cs @@ -0,0 +1,140 @@ +using LINGYUN.Abp.BackgroundTasks; +using LINGYUN.Abp.BackgroundTasks.Internal; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +public class TaskServiceDataSeeder : ITransientDependency +{ + protected AbpBackgroundTasksOptions Options { get; } + protected IJobStore JobStore { get; } + protected IJobScheduler JobScheduler { get; } + protected ICurrentTenant CurrentTenant { get; } + + public TaskServiceDataSeeder( + IOptions options, + IJobStore jobStore, + IJobScheduler jobScheduler, + ICurrentTenant currentTenant) + { + Options = options.Value; + JobStore = jobStore; + JobScheduler = jobScheduler; + CurrentTenant = currentTenant; + } + + public async virtual Task SeedAsync(DataSeedContext context) + { + if (context.TenantId.HasValue) + { + using (CurrentTenant.Change(context.TenantId)) + { + await QueueBackgroundJobAsync(context.TenantId.Value); + } + } + } + + public async virtual Task RemoveSeedAsync(Guid tenantId) + { + using (CurrentTenant.Change(tenantId)) + { + var pollingJob = BuildPollingJobInfo(tenantId); + await JobScheduler.RemoveAsync(pollingJob); + await JobStore.RemoveAsync(pollingJob.Id); + + var cleaningJob = BuildCleaningJobInfo(tenantId); + await JobScheduler.RemoveAsync(cleaningJob); + await JobStore.RemoveAsync(cleaningJob.Id); + + var checkingJob = BuildCheckingJobInfo(tenantId); + await JobScheduler.RemoveAsync(checkingJob); + await JobStore.RemoveAsync(checkingJob.Id); + } + } + + protected async virtual Task QueueBackgroundJobAsync(Guid tenantId) + { + var pollingJob = BuildPollingJobInfo(tenantId); + await JobStore.StoreAsync(pollingJob); + await JobScheduler.QueueAsync(pollingJob); + + var cleaningJob = BuildCleaningJobInfo(tenantId); + await JobStore.StoreAsync(cleaningJob); + await JobScheduler.QueueAsync(cleaningJob); + + var checkingJob = BuildCheckingJobInfo(tenantId); + await JobStore.StoreAsync(checkingJob); + await JobScheduler.QueueAsync(checkingJob); + } + + protected virtual JobInfo BuildPollingJobInfo(Guid tenantId) + { + return new JobInfo + { + Id = tenantId.ToString() + "_Polling", + Name = nameof(BackgroundPollingJob), + Group = "Polling", + Description = "Polling tasks to be executed", + Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, + Status = JobStatus.Running, + BeginTime = DateTime.Now, + CreationTime = DateTime.Now, + Cron = Options.JobFetchCronExpression, + JobType = JobType.Period, + Priority = JobPriority.High, + Source = JobSource.System, + LockTimeOut = Options.JobFetchLockTimeOut, + TenantId = tenantId, + Type = typeof(BackgroundPollingJob).AssemblyQualifiedName!, + }; + } + + protected virtual JobInfo BuildCleaningJobInfo(Guid tenantId) + { + return new JobInfo + { + Id = tenantId.ToString() + "_Cleaning", + Name = nameof(BackgroundCleaningJob), + Group = "Cleaning", + Description = "Cleaning tasks to be executed", + Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, + Status = JobStatus.Running, + BeginTime = DateTime.Now, + CreationTime = DateTime.Now, + Cron = Options.JobCleanCronExpression, + JobType = JobType.Period, + Priority = JobPriority.High, + Source = JobSource.System, + TenantId = tenantId, + Type = typeof(BackgroundCleaningJob).AssemblyQualifiedName!, + }; + } + + protected virtual JobInfo BuildCheckingJobInfo(Guid tenantId) + { + return new JobInfo + { + Id = tenantId.ToString() + "_Checking", + Name = nameof(BackgroundCheckingJob), + Group = "Checking", + Description = "Checking tasks to be executed", + Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, + Status = JobStatus.Running, + BeginTime = DateTime.Now, + CreationTime = DateTime.Now, + Cron = Options.JobCheckCronExpression, + LockTimeOut = Options.JobCheckLockTimeOut, + JobType = JobType.Period, + Priority = JobPriority.High, + Source = JobSource.System, + TenantId = tenantId, + Type = typeof(BackgroundCheckingJob).AssemblyQualifiedName!, + }; + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..4610f9fd4 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationEventHandler.cs @@ -0,0 +1,55 @@ +using LINGYUN.Abp.Saas.Tenants; +using Microsoft.Extensions.Logging; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +public class TaskServiceDbMigrationEventHandler : + EfCoreDatabaseMigrationEventHandlerBase, + IDistributedEventHandler> +{ + protected TaskServiceDataSeeder DataSeeder { get; } + + public TaskServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory, + TaskServiceDataSeeder dataSeeder) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + DataSeeder = dataSeeder; + } + + public async Task HandleEventAsync(EntityDeletedEto eventData) + { + // 租户删除时移除轮询作业 + await DataSeeder.RemoveSeedAsync(eventData.Entity.Id); + } + + protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) + { + // 新租户数据种子 + var context = new DataSeedContext(eventData.Id); + if (eventData.Properties != null) + { + foreach (var property in eventData.Properties) + { + context.WithProperty(property.Key, property.Value); + } + } + + await DataSeeder.SeedAsync(context); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationService.cs new file mode 100644 index 000000000..e4a7fb193 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceDbMigrationService.cs @@ -0,0 +1,27 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +public class TaskServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + public TaskServiceDbMigrationService( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContext.cs new file mode 100644 index 000000000..e1f2b0924 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContext.cs @@ -0,0 +1,23 @@ +using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +[ConnectionStringName("TaskManagementDbMigrator")] +public class TaskServiceMigrationsDbContext : AbpDbContext +{ + public TaskServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureTaskManagement(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..23c01818c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +public class TaskServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public TaskServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new TaskServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.TaskService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..236ee74c3 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore/TaskServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,42 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.Quartz.MySqlInstaller; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.TaskService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpQuartzMySqlInstallerModule), + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class TaskServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/LINGYUN.Abp.MicroService.WebhookService.DbMigrator.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/LINGYUN.Abp.MicroService.WebhookService.DbMigrator.csproj new file mode 100644 index 000000000..8811e8938 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/LINGYUN.Abp.MicroService.WebhookService.DbMigrator.csproj @@ -0,0 +1,36 @@ + + + + + + Exe + net10.0 + enable + enable + false + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Program.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Program.cs new file mode 100644 index 000000000..c201345c9 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Program.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; + +namespace LINGYUN.Abp.MicroService.WebhookService.DbMigrator; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) +#if DEBUG + .MinimumLevel.Override("LINGYUN.Abp.MicroService.WebhookService", LogEventLevel.Debug) +#else + .MinimumLevel.Override("LINGYUN.Abp.MicroService.WebhookService", LogEventLevel.Information) +#endif + .Enrich.FromLogContext() + .WriteTo.Console() + .WriteTo.File("Logs/migrations.txt") + .CreateLogger(); + + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + return Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureLogging((context, logging) => logging.ClearProviders()) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Properties/launchSettings.json new file mode 100644 index 000000000..b26caeb04 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.WebhookService.DbMigrator": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.EN.md new file mode 100644 index 000000000..66a5bd0c1 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.EN.md @@ -0,0 +1,65 @@ +# LINGYUN.Abp.MicroService.WebhookService.DbMigrator + +Webhooks Management Database Migration Console Application, used for executing database migrations and initializing seed data for the webhooks management system. + +[简体中文](./README.md) + +## Features + +* Automatic database migration execution +* Initialize necessary system seed data +* Support command line parameter configuration +* Integrated Autofac dependency injection container +* Inherit all migration features from webhooks management system + +## Module Dependencies + +```csharp +[DependsOn( + typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "WebhooksManagementDbMigrator": "Your database connection string" + }, + "IdentityServer": { + "Clients": { + "WebhooksManagement_App": { + "ClientId": "WebhooksManagement_App" + } + } + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure WebhooksManagementDbMigrator connection string in appsettings.json + +2. Run Migration Program + ```bash + dotnet run + ``` + +## Command Line Arguments + +* --database-provider + * Specify database provider (default: MySQL) +* --connection-string + * Specify database connection string +* --skip-db-migrations + * Skip database migrations +* --skip-seed-data + * Skip seed data initialization + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.md new file mode 100644 index 000000000..47b4ab4a7 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/README.md @@ -0,0 +1,65 @@ +# LINGYUN.Abp.MicroService.WebhookService.DbMigrator + +Webhooks管理数据库迁移控制台应用程序,用于执行Webhooks管理系统的数据库迁移和初始化种子数据。 + +[English](./README.EN.md) + +## 功能特性 + +* 自动执行数据库迁移 +* 初始化系统必要的种子数据 +* 支持命令行参数配置 +* 集成Autofac依赖注入容器 +* 继承Webhooks管理系统的所有迁移功能 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "WebhooksManagementDbMigrator": "你的数据库连接字符串" + }, + "IdentityServer": { + "Clients": { + "WebhooksManagement_App": { + "ClientId": "WebhooksManagement_App" + } + } + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置WebhooksManagementDbMigrator连接字符串 + +2. 运行迁移程序 + ```bash + dotnet run + ``` + +## 命令行参数 + +* --database-provider + * 指定数据库提供程序 (默认: MySQL) +* --connection-string + * 指定数据库连接字符串 +* --skip-db-migrations + * 跳过数据库迁移 +* --skip-seed-data + * 跳过种子数据初始化 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Usings.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Usings.cs new file mode 100644 index 000000000..c79c834ca --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/Usings.cs @@ -0,0 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorHostedService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorHostedService.cs new file mode 100644 index 000000000..04344cdc7 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorHostedService.cs @@ -0,0 +1,51 @@ +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using Volo.Abp; +using Volo.Abp.Data; + +namespace LINGYUN.Abp.MicroService.WebhookService.DbMigrator; + +public class WebhookServiceDbMigratorHostedService : IHostedService +{ + private readonly IHostApplicationLifetime _hostApplicationLifetime; + private readonly IConfiguration _configuration; + + public WebhookServiceDbMigratorHostedService( + IHostApplicationLifetime hostApplicationLifetime, + IConfiguration configuration) + { + _hostApplicationLifetime = hostApplicationLifetime; + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using var application = await AbpApplicationFactory + .CreateAsync(options => + { + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); + }); + await application.InitializeAsync(); + + await application + .ServiceProvider + .GetRequiredService() + .CheckAndApplyDatabaseMigrationsAsync(); + + await application.ShutdownAsync(); + + _hostApplicationLifetime.StopApplication(); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.Configure.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.Configure.cs new file mode 100644 index 000000000..b3f1a1738 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.Configure.cs @@ -0,0 +1,4 @@ +namespace LINGYUN.Abp.MicroService.WebhookService.DbMigrator; +public partial class WebhookServiceDbMigratorModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.cs new file mode 100644 index 000000000..8a89d10de --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/WebhookServiceDbMigratorModule.cs @@ -0,0 +1,13 @@ +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.MicroService.WebhookService.DbMigrator; + +[DependsOn( + typeof(WebhookServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpAutofacModule) + )] +public partial class WebhookServiceDbMigratorModule : AbpModule +{ +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/appsettings.json b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/appsettings.json new file mode 100644 index 000000000..7f4a7f274 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.DbMigrator/appsettings.json @@ -0,0 +1,75 @@ +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } +} diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/FodyWeavers.xml b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/FodyWeavers.xml rename to aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/FodyWeavers.xml diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.csproj b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.csproj new file mode 100644 index 000000000..859be734c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.csproj @@ -0,0 +1,29 @@ + + + + + + + false + net10.0 + LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs new file mode 100644 index 000000000..fd496b7ba --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs @@ -0,0 +1,250 @@ +// +using System; +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(WebhookServiceMigrationsDbContext))] + [Migration("20230112004517_Initial-Webhooks-Management")] + partial class InitialWebhooksManagement + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("RequiredFeatures") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhooks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Data") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("WebhookName"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksEvents", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhookGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("RequestHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("RequestHeaders"); + + b.Property("Response") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Response"); + + b.Property("ResponseHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("ResponseHeaders"); + + b.Property("ResponseStatusCode") + .HasColumnType("int"); + + b.Property("SendExactSameData") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookEventId") + .HasColumnType("char(36)"); + + b.Property("WebhookSubscriptionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WebhookEventId"); + + b.ToTable("AbpWebhooksSendAttempts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Headers") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Headers"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Secret") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Secret"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookUri") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("WebhookUri"); + + b.Property("Webhooks") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Webhooks"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksSubscriptions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") + .WithOne() + .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WebhookEvent"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs new file mode 100644 index 000000000..b51ead093 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs @@ -0,0 +1,177 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + /// + public partial class InitialWebhooksManagement : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpWebhooksEvents", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + WebhookName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Data = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + DeletionTime = table.Column(type: "datetime(6)", nullable: true), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpWebhooksEvents", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpWebhooksSubscriptions", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + WebhookUri = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Secret = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsActive = table.Column(type: "tinyint(1)", nullable: false), + Webhooks = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Headers = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpWebhooksSubscriptions", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpWebhooksWebhookGroups", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpWebhooksWebhookGroups", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpWebhooksWebhooks", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + RequiredFeatures = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpWebhooksWebhooks", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpWebhooksSendAttempts", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + WebhookEventId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + WebhookSubscriptionId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + Response = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ResponseStatusCode = table.Column(type: "int", nullable: true), + RequestHeaders = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ResponseHeaders = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + SendExactSameData = table.Column(type: "tinyint(1)", nullable: false), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpWebhooksSendAttempts", x => x.Id); + table.ForeignKey( + name: "FK_AbpWebhooksSendAttempts_AbpWebhooksEvents_WebhookEventId", + column: x => x.WebhookEventId, + principalTable: "AbpWebhooksEvents", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpWebhooksSendAttempts_WebhookEventId", + table: "AbpWebhooksSendAttempts", + column: "WebhookEventId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpWebhooksWebhookGroups_Name", + table: "AbpWebhooksWebhookGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpWebhooksWebhooks_GroupName", + table: "AbpWebhooksWebhooks", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpWebhooksWebhooks_Name", + table: "AbpWebhooksWebhooks", + column: "Name", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpWebhooksSendAttempts"); + + migrationBuilder.DropTable( + name: "AbpWebhooksSubscriptions"); + + migrationBuilder.DropTable( + name: "AbpWebhooksWebhookGroups"); + + migrationBuilder.DropTable( + name: "AbpWebhooksWebhooks"); + + migrationBuilder.DropTable( + name: "AbpWebhooksEvents"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs new file mode 100644 index 000000000..28aa2b1e5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs @@ -0,0 +1,261 @@ +// +using System; +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(WebhookServiceMigrationsDbContext))] + [Migration("20230324095512_Add-Description-To-Subscription")] + partial class AddDescriptionToSubscription + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("RequiredFeatures") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhooks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Data") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("WebhookName"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksEvents", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhookGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("RequestHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("RequestHeaders"); + + b.Property("Response") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Response"); + + b.Property("ResponseHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("ResponseHeaders"); + + b.Property("ResponseStatusCode") + .HasColumnType("int"); + + b.Property("SendExactSameData") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookEventId") + .HasColumnType("char(36)"); + + b.Property("WebhookSubscriptionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WebhookEventId"); + + b.ToTable("AbpWebhooksSendAttempts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Description"); + + b.Property("Headers") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Headers"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Secret") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Secret"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookUri") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("WebhookUri"); + + b.Property("Webhooks") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Webhooks"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksSubscriptions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") + .WithOne() + .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WebhookEvent"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs new file mode 100644 index 000000000..ac7cb249c --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddDescriptionToSubscription : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ConcurrencyStamp", + table: "AbpWebhooksSubscriptions", + type: "varchar(40)", + maxLength: 40, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "Description", + table: "AbpWebhooksSubscriptions", + type: "varchar(128)", + maxLength: 128, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ConcurrencyStamp", + table: "AbpWebhooksSubscriptions"); + + migrationBuilder.DropColumn( + name: "Description", + table: "AbpWebhooksSubscriptions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs new file mode 100644 index 000000000..6d3850550 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs @@ -0,0 +1,264 @@ +// +using System; +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(WebhookServiceMigrationsDbContext))] + [Migration("20240605074803_Add-Timeout-Duration-To-Subscription")] + partial class AddTimeoutDurationToSubscription + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("RequiredFeatures") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhooks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Data") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("WebhookName"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksEvents", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhookGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("RequestHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("RequestHeaders"); + + b.Property("Response") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Response"); + + b.Property("ResponseHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("ResponseHeaders"); + + b.Property("ResponseStatusCode") + .HasColumnType("int"); + + b.Property("SendExactSameData") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookEventId") + .HasColumnType("char(36)"); + + b.Property("WebhookSubscriptionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WebhookEventId"); + + b.ToTable("AbpWebhooksSendAttempts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Description"); + + b.Property("Headers") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Headers"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Secret") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Secret"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("TimeoutDuration") + .HasColumnType("int"); + + b.Property("WebhookUri") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("WebhookUri"); + + b.Property("Webhooks") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Webhooks"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksSubscriptions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") + .WithOne() + .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WebhookEvent"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs new file mode 100644 index 000000000..26950a3c5 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + /// + public partial class AddTimeoutDurationToSubscription : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TimeoutDuration", + table: "AbpWebhooksSubscriptions", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TimeoutDuration", + table: "AbpWebhooksSubscriptions"); + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/WebhookServiceMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/WebhookServiceMigrationsDbContextModelSnapshot.cs new file mode 100644 index 000000000..09667506a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/Migrations/WebhookServiceMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,261 @@ +// +using System; +using LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(WebhookServiceMigrationsDbContext))] + partial class WebhookServiceMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("RequiredFeatures") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhooks", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("Data") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Data"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("WebhookName"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksEvents", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpWebhooksWebhookGroups", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("RequestHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("RequestHeaders"); + + b.Property("Response") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Response"); + + b.Property("ResponseHeaders") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("ResponseHeaders"); + + b.Property("ResponseStatusCode") + .HasColumnType("int"); + + b.Property("SendExactSameData") + .HasColumnType("tinyint(1)"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("WebhookEventId") + .HasColumnType("char(36)"); + + b.Property("WebhookSubscriptionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WebhookEventId"); + + b.ToTable("AbpWebhooksSendAttempts", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Description"); + + b.Property("Headers") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Headers"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Secret") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Secret"); + + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("TimeoutDuration") + .HasColumnType("int"); + + b.Property("WebhookUri") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)") + .HasColumnName("WebhookUri"); + + b.Property("Webhooks") + .HasMaxLength(2147483647) + .HasColumnType("longtext") + .HasColumnName("Webhooks"); + + b.HasKey("Id"); + + b.ToTable("AbpWebhooksSubscriptions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => + { + b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") + .WithOne() + .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("WebhookEvent"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.EN.md new file mode 100644 index 000000000..789060281 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.EN.md @@ -0,0 +1,69 @@ +# LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore + +Webhooks Management Database Migration Module, providing database migration functionality for the webhooks management system. + +[简体中文](./README.md) + +## Features + +* Integrated SaaS multi-tenancy data migration +* Integrated Webhooks Management data migration +* Integrated Setting Management data migration +* Integrated Permission Management data migration +* Integrated Feature Management data migration +* Support for MySQL database + +## Module Dependencies + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(WebhooksManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## Configuration + +```json +{ + "ConnectionStrings": { + "WebhooksManagementDbMigrator": "Your database connection string" + } +} +``` + +## Basic Usage + +1. Configure Database Connection String + * Configure WebhooksManagementDbMigrator connection string in appsettings.json + +2. Add Module Dependency + ```csharp + [DependsOn(typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## Database Tables Description + +* AbpWebhooks - Webhooks basic information table +* AbpWebhookSubscriptions - Webhooks subscriptions table +* AbpWebhookGroups - Webhooks groups table +* AbpWebhookEvents - Webhooks events table +* AbpWebhookSendAttempts - Webhooks send attempts table +* Saas Related Tables - Tenant, edition and other multi-tenancy related data +* AbpSettings - System settings data +* AbpPermissionGrants - Permission authorization data +* AbpFeatures - Feature data + +## More Information + +* [ABP Documentation](https://docs.abp.io) +* [ABP Webhooks Module](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/webhooks-management) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.md b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.md new file mode 100644 index 000000000..322e30007 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/README.md @@ -0,0 +1,69 @@ +# LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore + +Webhooks管理数据迁移模块,提供Webhooks管理系统相关的数据库迁移功能。 + +[English](./README.EN.md) + +## 功能特性 + +* 集成SaaS多租户数据迁移 +* 集成Webhooks管理数据迁移 +* 集成设置管理数据迁移 +* 集成权限管理数据迁移 +* 集成特性管理数据迁移 +* 支持MySQL数据库 + +## 模块依赖 + +```csharp +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(WebhooksManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) +)] +``` + +## 配置项 + +```json +{ + "ConnectionStrings": { + "WebhooksManagementDbMigrator": "你的数据库连接字符串" + } +} +``` + +## 基本用法 + +1. 配置数据库连接字符串 + * 在appsettings.json中配置WebhooksManagementDbMigrator连接字符串 + +2. 添加模块依赖 + ```csharp + [DependsOn(typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule))] + public class YourModule : AbpModule + { + // ... + } + ``` + +## 数据库表说明 + +* AbpWebhooks - Webhooks基本信息表 +* AbpWebhookSubscriptions - Webhooks订阅表 +* AbpWebhookGroups - Webhooks分组表 +* AbpWebhookEvents - Webhooks事件表 +* AbpWebhookSendAttempts - Webhooks发送记录表 +* Saas相关表 - 租户、版本等多租户相关数据 +* AbpSettings - 系统设置数据 +* AbpPermissionGrants - 权限授权数据 +* AbpFeatures - 功能特性数据 + +## 更多信息 + +* [ABP文档](https://docs.abp.io) +* [ABP Webhooks模块](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/webhooks-management) diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationEventHandler.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationEventHandler.cs new file mode 100644 index 000000000..c61cf5b52 --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationEventHandler.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.Logging; +using Volo.Abp.Data; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EntityFrameworkCore.Migrations; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; + +public class WebhookServiceDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase +{ + public WebhookServiceDbMigrationEventHandler( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + ITenantStore tenantStore, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) + { + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationService.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationService.cs new file mode 100644 index 000000000..233338b5a --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceDbMigrationService.cs @@ -0,0 +1,27 @@ +using LINGYUN.Abp.Data.DbMigrator; +using Microsoft.Extensions.Logging; +using System; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; + +public class WebhookServiceDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency +{ + public WebhookServiceDbMigrationService( + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) + { + } +} \ No newline at end of file diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContext.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContext.cs new file mode 100644 index 000000000..efbafaa9d --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContext.cs @@ -0,0 +1,23 @@ +using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; + +[ConnectionStringName("WebhooksManagementDbMigrator")] +public class WebhookServiceMigrationsDbContext : AbpDbContext +{ + public WebhookServiceMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureWebhooksManagement(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContextFactory.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContextFactory.cs new file mode 100644 index 000000000..4645acfdd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; +using System.IO; + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; + +public class WebhookServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory +{ + public WebhookServiceMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + var connectionString = configuration.GetConnectionString("Default"); + + var builder = new DbContextOptionsBuilder() + .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); + + return new WebhookServiceMigrationsDbContext(builder!.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LINGYUN.Abp.MicroService.WebhookService.DbMigrator/")) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsEntityFrameworkCoreModule.cs new file mode 100644 index 000000000..482a6fbbd --- /dev/null +++ b/aspnet-core/migrations/LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore/WebhookServiceMigrationsEntityFrameworkCoreModule.cs @@ -0,0 +1,40 @@ +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.EntityFrameworkCore.MySQL; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; + +namespace LINGYUN.Abp.MicroService.WebhookService.EntityFrameworkCore; + +[DependsOn( + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(WebhooksManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule) + )] +public class WebhookServiceMigrationsEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(); + + Configure(options => + { + options.UseMySQL( + mysql => + { + // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 + mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); + }); + }); + } +} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs deleted file mode 100644 index 012bc81e9..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs +++ /dev/null @@ -1,60 +0,0 @@ -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.AuthServer.DbMigrator; - -public class AuthServerDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public AuthServerDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(AuthServerDbMigratorHostedService).Assembly; - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .SeedAsync(new DataSeedContext()); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs deleted file mode 100644 index d93c9ec2a..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.AuthServer.DbMigrator; -public partial class AuthServerDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs deleted file mode 100644 index 6020b2320..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs +++ /dev/null @@ -1,19 +0,0 @@ -using LINGYUN.Abp.Identity.Notifications; -using LINGYUN.Abp.Notifications.Common; -using LINGYUN.Abp.Notifications.EntityFrameworkCore; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.AuthServer.DbMigrator; - -[DependsOn( - typeof(AuthServerMigrationsEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpNotificationsCommonModule), - typeof(AbpIdentityNotificationsModule), - typeof(AbpAutofacModule) - )] -public partial class AuthServerDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs deleted file mode 100644 index 0f7eb8b93..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerInitializeDataSeeder.cs +++ /dev/null @@ -1,20 +0,0 @@ -using LY.MicroService.AuthServer.DbMigrator.DataSeeds; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; - -namespace LY.MicroService.AuthServer.DbMigrator; - -public class AuthServerInitializeDataSeeder : ITransientDependency -{ - protected IdentityUserNotificationDataSeeder UserNotificationDataSeeder { get; } - public AuthServerInitializeDataSeeder(IdentityUserNotificationDataSeeder userNotificationDataSeeder) - { - UserNotificationDataSeeder = userNotificationDataSeeder; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - await UserNotificationDataSeeder.SeedAsync(context); - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs deleted file mode 100644 index 56a7d5abc..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/DataSeeds/IdentityUserNotificationDataSeeder.cs +++ /dev/null @@ -1,89 +0,0 @@ -using LINGYUN.Abp.Identity.Notifications; -using LINGYUN.Abp.Notifications; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Identity; -using Volo.Abp.Users; - -namespace LY.MicroService.AuthServer.DbMigrator.DataSeeds; - -public class IdentityUserNotificationDataSeeder : ITransientDependency -{ - public ILogger Logger { protected get; set; } - protected IdentityUserManager IdentityUserManager { get; } - protected INotificationSender NotificationSender { get; } - protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } - public IdentityUserNotificationDataSeeder( - IdentityUserManager identityUserManager, - INotificationSender notificationSender, - INotificationSubscriptionManager notificationSubscriptionManager) - { - IdentityUserManager = identityUserManager; - NotificationSender = notificationSender; - NotificationSubscriptionManager = notificationSubscriptionManager; - - Logger = NullLogger.Instance; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - await SubscribeDefaultNotifierAsync(context); - } - - protected async virtual Task SubscribeDefaultNotifierAsync(DataSeedContext context) - { - var user = await IdentityUserManager.FindByNameAsync("admin"); - if (user == null) - { - Logger.LogInformation("No user information named {UserName} was found, so default messages cannot be subscribed to.", "admin"); - return; - } - Logger.LogInformation("User {UserId} has subscribed to default notifications.", user.Id); - var userIdentifer = new UserIdentifier(user.Id, user.UserName); - // 订阅内置通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.SystemNotice); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.OnsideNotice); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.ActivityNotice); - - // 新用户订阅会话过期通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - IdentityNotificationNames.Session.ExpirationSession); - // 新用户订阅不活跃用户相关通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - IdentityNotificationNames.IdentityUser.InactiveUserReminderNotifier); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - IdentityNotificationNames.IdentityUser.InactiveUserDeactivationNotifier); - - // 订阅用户欢迎消息 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - UserNotificationNames.WelcomeToApplication); - - Logger.LogInformation("User {UserId} is subscribed to notifications by default.", user.Id); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj deleted file mode 100644 index 52fc6311b..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - Debug;Release - AnyCPU - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs deleted file mode 100644 index 1bea700a3..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.AuthServer.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.AuthServer.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.AuthServer.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index 210486f38..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.AuthServer.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.EN.md deleted file mode 100644 index f54c1f155..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.EN.md +++ /dev/null @@ -1,66 +0,0 @@ -# LY.MicroService.AuthServer.DbMigrator - -Authentication Server Database Migration Console Application, used for executing database migrations and initializing seed data for the authentication server. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Inherit all migration features from authentication server - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AuthServerMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "AuthServerDbMigrator": "Your database connection string" - }, - "IdentityServer": { - "Clients": { - "AuthServer_App": { - "ClientId": "AuthServer_App" - } - } - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure AuthServerDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) -* [IdentityServer4 Documentation](https://identityserver4.readthedocs.io) diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.md deleted file mode 100644 index 504b92ed5..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# LY.MicroService.AuthServer.DbMigrator - -认证服务器数据库迁移控制台应用程序,用于执行认证服务器的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 继承认证服务器的所有迁移功能 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AuthServerMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "AuthServerDbMigrator": "你的数据库连接字符串" - }, - "IdentityServer": { - "Clients": { - "AuthServer_App": { - "ClientId": "AuthServer_App" - } - } - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置AuthServerDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) -* [IdentityServer4文档](https://identityserver4.readthedocs.io) diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json deleted file mode 100644 index 3713bd2da..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "OpenIddict": { - "Applications": { - "VueAdmin": { - "ClientId": "vue-admin-client", - "ClientSecret": "1q2w3e*", - "RootUrls": [ "http://localhost:5666" ] - }, - "InternalService": { - "ClientId": "InternalServiceClient", - "ClientSecret": "1q2w3e*" - }, - "VueOAuthClient": { - "ClientId": "vue-oauth-client", - "RootUrls": [ - "http://localhost:5666", - "http://localhost:30000", - "http://localhost:30010", - "http://localhost:30015", - "http://localhost:30020", - "http://localhost:30025", - "http://localhost:30030", - "http://localhost:30040", - "http://localhost:30045", - "http://localhost:30050", - "http://localhost:30060", - "http://localhost:30070" - ] - } - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs deleted file mode 100644 index abc51af3b..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDataSeeder.cs +++ /dev/null @@ -1,36 +0,0 @@ -using LY.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -public class AuthServerDataSeeder : ITransientDependency -{ - protected ICurrentTenant CurrentTenant { get; } - protected OpenIddictDataSeeder OpenIddictDataSeeder { get; } - protected IdentityClaimTypeDataSeeder IdentityClaimTypeDataSeeder { get; } - protected IdentityUserRoleDataSeeder IdentityUserRoleDataSeeder { get; } - public AuthServerDataSeeder( - ICurrentTenant currentTenant, - OpenIddictDataSeeder openIddictDataSeeder, - IdentityClaimTypeDataSeeder identityClaimTypeDataSeeder, - IdentityUserRoleDataSeeder identityUserRoleDataSeeder) - { - CurrentTenant = currentTenant; - OpenIddictDataSeeder = openIddictDataSeeder; - IdentityClaimTypeDataSeeder = identityClaimTypeDataSeeder; - IdentityUserRoleDataSeeder = identityUserRoleDataSeeder; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - using (CurrentTenant.Change(context.TenantId)) - { - await OpenIddictDataSeeder.SeedAsync(context); - await IdentityClaimTypeDataSeeder.SeedAsync(context); - await IdentityUserRoleDataSeeder.SeedAsync(context); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs deleted file mode 100644 index 013822cab..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.Extensions.Logging; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.Guids; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -public class AuthServerDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase -{ - protected AuthServerDataSeeder DataSeeder { get; } - - public AuthServerDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory, - IGuidGenerator guidGenerator, - AuthServerDataSeeder dataSeeder) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) - { - // 新租户数据种子 - var context = new DataSeedContext(eventData.Id); - if (eventData.Properties != null) - { - foreach (var property in eventData.Properties) - { - context.WithProperty(property.Key, property.Value); - } - } - - await DataSeeder.SeedAsync(context); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs deleted file mode 100644 index e19004c0f..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -public class AuthServerDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - protected AuthServerDataSeeder DataSeeder { get; } - - public AuthServerDbMigrationService( - AuthServerDataSeeder dataSeeder, - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task SeedAsync() - { - // DbMigrator迁移数据种子 - await DataSeeder.SeedAsync(new DataSeedContext()); - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs deleted file mode 100644 index fcaec835c..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs +++ /dev/null @@ -1,31 +0,0 @@ -using LINGYUN.Abp.Gdpr.EntityFrameworkCore; -using LINGYUN.Abp.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.OpenIddict.EntityFrameworkCore; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -[ConnectionStringName("AuthServerDbMigrator")] -public class AuthServerMigrationsDbContext : AbpDbContext -{ - public AuthServerMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureIdentity(); - modelBuilder.ConfigureOpenIddict(); - - modelBuilder.ConfigureGdpr(); - - modelBuilder.ConfigureIdentityUserInactive(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs deleted file mode 100644 index 9dc1039a1..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public AuthServerMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new AuthServerMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.AuthServer.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index 242e60e62..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,58 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.Gdpr.EntityFrameworkCore; -using LINGYUN.Abp.Identity.EntityFrameworkCore; -using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Authorization; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.OpenIddict.EntityFrameworkCore; -using Volo.Abp.OpenIddict.Tokens; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore; - -[DependsOn( - typeof(AbpAuthorizationModule), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpOpenIddictEntityFrameworkCoreModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - typeof(AbpGdprEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(PlatformEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpDataDbMigratorModule) - )] -public class AuthServerMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - - context.Services.AddAbpDbContext(options => - { - options.AddRepository(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs deleted file mode 100644 index a96480053..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs +++ /dev/null @@ -1,96 +0,0 @@ -using JetBrains.Annotations; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using OpenIddict.Abstractions; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Guids; -using Volo.Abp.Identity; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; -public class IdentityClaimTypeDataSeeder : ITransientDependency -{ - public ILogger Logger { protected get; set; } - - protected IGuidGenerator GuidGenerator { get; } - protected IdentityClaimTypeManager IdentityClaimTypeManager { get; } - protected IIdentityClaimTypeRepository IdentityClaimTypeRepository { get; } - public IdentityClaimTypeDataSeeder( - IGuidGenerator guidGenerator, - IdentityClaimTypeManager identityClaimTypeManager, - IIdentityClaimTypeRepository identityClaimTypeRepository) - { - GuidGenerator = guidGenerator; - IdentityClaimTypeManager = identityClaimTypeManager; - IdentityClaimTypeRepository = identityClaimTypeRepository; - - Logger = NullLogger.Instance; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - if (context.TenantId.HasValue) - { - return; - } - - Logger.LogInformation("Seeding the default identity claim types..."); - - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Address); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Birthdate, valueType: IdentityClaimValueType.DateTime); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Country); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Email); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.EmailVerified, valueType: IdentityClaimValueType.Boolean); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.FamilyName); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Gender); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.GivenName); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Locale); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Locality); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.MiddleName); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Name); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Nickname); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PhoneNumber); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PhoneNumberVerified, valueType: IdentityClaimValueType.Boolean); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Picture); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PostalCode); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.PreferredUsername); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Profile); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Region); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Role); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.StreetAddress); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Username); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Website); - await CreateIdentityClaimTypeAsync(OpenIddictConstants.Claims.Zoneinfo); - - Logger.LogInformation("Seeding default identity claim types completed."); - } - - private async Task CreateIdentityClaimTypeAsync( - [NotNull] string name, - bool required = false, - bool isStatic = false, - [CanBeNull] string? regex = null, - [CanBeNull] string? regexDescription = null, - [CanBeNull] string? description = null, - IdentityClaimValueType valueType = IdentityClaimValueType.String) - { - Logger.LogInformation("Check claim types {name} exists.", name); - - if (!await IdentityClaimTypeRepository.AnyAsync(name)) - { - Logger.LogInformation("Create new claim types {name}.", name); - - await IdentityClaimTypeManager.CreateAsync( - new IdentityClaimType( - GuidGenerator.Create(), - name, - required, - isStatic, - regex, - regexDescription, - description, - valueType)); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs deleted file mode 100644 index 59237a2d6..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs +++ /dev/null @@ -1,149 +0,0 @@ -using Microsoft.AspNetCore.Identity; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using Microsoft.Extensions.Options; -using System; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Guids; -using Volo.Abp.Identity; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; - -public class IdentityUserRoleDataSeeder : ITransientDependency -{ - public const string AdminUserIdPropertyName = "AdminUserId"; - public const string AdminEmailPropertyName = "AdminEmail"; - public const string AdminEmailDefaultValue = "admin@abp.io"; - public const string AdminUserNamePropertyName = "AdminUserName"; - public const string AdminUserNameDefaultValue = "admin"; - public const string AdminPasswordPropertyName = "AdminPassword"; - public const string AdminPasswordDefaultValue = "1q2w3E*"; - - public ILogger Logger { protected get; set; } - - protected IGuidGenerator GuidGenerator { get; } - protected IIdentityRoleRepository RoleRepository { get; } - protected IIdentityUserRepository UserRepository { get; } - protected ILookupNormalizer LookupNormalizer { get; } - protected IdentityUserManager UserManager { get; } - protected IdentityRoleManager RoleManager { get; } - protected IOptions IdentityOptions { get; } - - public IdentityUserRoleDataSeeder( - IGuidGenerator guidGenerator, - IIdentityRoleRepository roleRepository, - IIdentityUserRepository userRepository, - ILookupNormalizer lookupNormalizer, - IdentityUserManager userManager, - IdentityRoleManager roleManager, - IOptions identityOptions) - { - GuidGenerator = guidGenerator; - RoleRepository = roleRepository; - UserRepository = userRepository; - LookupNormalizer = lookupNormalizer; - UserManager = userManager; - RoleManager = roleManager; - IdentityOptions = identityOptions; - - Logger = NullLogger.Instance; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - Logger.LogInformation("Seeding the admin user roles..."); - await SeedAdminUserAsync(context); - - Logger.LogInformation("Seeding the default roles..."); - await SeedDefaultRoleAsync(context); - - Logger.LogInformation("Seeding user roles completed."); - } - - private async Task SeedAdminUserAsync(DataSeedContext context) - { - await IdentityOptions.SetAsync(); - - const string adminRoleName = "admin"; - var adminUserName = context[AdminUserNamePropertyName] as string ?? AdminUserNameDefaultValue; - - Guid adminRoleId; - - Logger.LogInformation("Check admin role {adminRoleName} exists.", adminRoleName); - - if (!await RoleManager.RoleExistsAsync(adminRoleName)) - { - Logger.LogInformation("Create new role {adminRoleName}.", adminRoleName); - - adminRoleId = GuidGenerator.Create(); - var adminRole = new IdentityRole( - adminRoleId, - adminRoleName, - context.TenantId) - { - IsStatic = true, - IsPublic = true - }; - (await RoleManager.CreateAsync(adminRole)).CheckErrors(); - } - else - { - var adminRole = await RoleManager.FindByNameAsync(adminRoleName); - adminRoleId = adminRole!.Id; - } - - var adminUserId = GuidGenerator.Create(); - if (context.Properties.TryGetValue(AdminUserIdPropertyName, out var userIdString) && - Guid.TryParse(userIdString?.ToString(), out var adminUserGuid)) - { - adminUserId = adminUserGuid; - } - var adminEmailAddress = context[AdminEmailPropertyName] as string ?? AdminEmailDefaultValue; - var adminPassword = context[AdminPasswordPropertyName] as string ?? AdminPasswordDefaultValue; - - Logger.LogInformation("Check admin user {adminUserName} exists.", adminUserName); - - var adminUser = await UserManager.FindByNameAsync(adminUserName); - if (adminUser == null) - { - Logger.LogInformation("Create new user {adminUserName}.", adminUserName); - - adminUser = new IdentityUser( - adminUserId, - adminUserName, - adminEmailAddress, - context.TenantId); - - adminUser.AddRole(adminRoleId); - - // 创建租户管理用户 - (await UserManager.CreateAsync(adminUser)).CheckErrors(); - - Logger.LogInformation("Add user {adminUserName} password.", adminUserName); - (await UserManager.AddPasswordAsync(adminUser, adminPassword)).CheckErrors(); - } - } - - private async Task SeedDefaultRoleAsync(DataSeedContext context) - { - const string defaultRoleName = "Users"; - Logger.LogInformation("Check Role {defaultRoleName} exists.", defaultRoleName); - if (!await RoleManager.RoleExistsAsync(defaultRoleName)) - { - Logger.LogInformation("Create new role {defaultRoleName}.", defaultRoleName); - var roleId = GuidGenerator.Create(); - var defaultRole = new IdentityRole( - roleId, - defaultRoleName, - context.TenantId) - { - IsStatic = true, - IsPublic = true, - IsDefault = true, - }; - (await RoleManager.CreateAsync(defaultRole)).CheckErrors(); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs deleted file mode 100644 index 2a8ab9909..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/OpenIddictDataSeeder.cs +++ /dev/null @@ -1,437 +0,0 @@ -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using OpenIddict.Abstractions; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading.Tasks; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.OpenIddict; -using Volo.Abp.OpenIddict.Applications; -using Volo.Abp.OpenIddict.Scopes; -using Volo.Abp.PermissionManagement; - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.DataSeeds; - -public class OpenIddictDataSeeder : OpenIddictDataSeedContributorBase, ITransientDependency -{ - public ILogger Logger { protected get; set; } - protected IPermissionDataSeeder PermissionDataSeeder { get; } - public OpenIddictDataSeeder( - IConfiguration configuration, - IOpenIddictApplicationRepository openIddictApplicationRepository, - IAbpApplicationManager applicationManager, - IOpenIddictScopeRepository openIddictScopeRepository, - IOpenIddictScopeManager scopeManager, - IPermissionDataSeeder permissionDataSeeder) - : base(configuration, openIddictApplicationRepository, applicationManager, openIddictScopeRepository, scopeManager) - { - PermissionDataSeeder = permissionDataSeeder; - - Logger = NullLogger.Instance; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - if (context.TenantId.HasValue) - { - return; - } - var applicationScope = "lingyun-abp-application"; - - Logger.LogInformation("Seeding the default scope..."); - await CreateDefaultScopeAsync(); - await CreateApiScopesAsync(applicationScope); - - Logger.LogInformation("Seeding the default applications..."); - await CreateApplicationAsync(applicationScope); - - Logger.LogInformation("Seeding default applications completed."); - } - - private async Task CreateDefaultScopeAsync() - { - // OpenId Connect - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.OpenId, - "OpenId Connect", - "身份认证", - "OpenId Connect", - "OpenId Connect协议进行身份验证", - "允许应用程序使用您的身份信息进行登录", - "Allow the application to authenticate you using OpenID Connect"); - - // Profile - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.Profile, - "个人资料", - "个人资料", - "Profile", - "访问您的基本个人资料信息", - "允许应用程序访问您的姓名、头像等基本信息", - "Allow the application to access your basic profile information like name and picture"); - - // Email - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.Email, - "电子邮件", - "电子邮件", - "Email", - "访问您的电子邮件地址", - "允许应用程序访问您的电子邮件地址", - "Allow the application to access your email address"); - - // Phone - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.Phone, - "电话号码", - "电话号码", - "Phone", - "访问您的电话号码", - "允许应用程序访问您的电话号码", - "Allow the application to access your phone number"); - - // Address - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.Address, - "地址信息", - "地址信息", - "Address", - "访问您的地址信息", - "允许应用程序访问您的地址信息", - "Allow the application to access your address information"); - - // Roles - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.Roles, - "角色信息", - "角色信息", - "Roles", - "访问您的角色信息", - "允许应用程序访问您的角色和权限信息", - "Allow the application to access your roles and permissions"); - - // OfflineAccess - await CreateServiceScopeAsync( - OpenIddictConstants.Scopes.OfflineAccess, - "离线访问", - "离线访问", - "Offline access", - "在您未登录时访问您的信息", - "允许应用程序在您未登录时访问您的信息", - "Allow the application to access your information while you are offline"); - } - - private async Task CreateApiScopesAsync(string scope) - { - // 前端汇总授权范围 - await CreateServiceScopeAsync( - scope, - "微服务访问授权", - "微服务访问授权", - "MicroService applications access", - "适用于微服务体系的接口授权", - "允许应用程序使用各微服务模块的接口", - "Allow the application to use the interfaces of each microservice module", - [ - "api-gateway", - "auth-server", - "admin-service", - "ai-service", - "identity-service", - "localization-service", - "message-service", - "platform-service", - "task-service", - "webhook-service", - "wechat-service", - "workflow-service" - ]); - // ApiGateway Swagger - await CreateServiceScopeAsync( - "api-gateway", - "Api Gateway", - "应用程序接口网关", - "Api Gateway", - "适用于应用程序接口网关Swagger授权", - "适用于应用程序接口网关Swagger授权", - "Applicable to application Programming interface gateway Swagger authorization", - ["api-gateway"]); - // Admin Service - await CreateServiceScopeAsync( - "admin-service", - "Admin Service", - "后台管理服务", - "Admin Service", - "适用于后台管理服务Swagger授权", - "适用于后台管理服务Swagger授权", - "Applicable to the back-end management service Swagger authorization", - ["admin-service"]); - // Auth Server - await CreateServiceScopeAsync( - "auth-server", - "Auth Server", - "身份认证服务器", - "Auth Server", - "适用于身份认证服务器Swagger授权", - "适用于身份认证服务器Swagger授权", - "Applicable to the auth server Swagger authorization", - ["auth-server"]); - // Identity Service - await CreateServiceScopeAsync( - "identity-service", - "Identity Service", - "身份认证服务", - "Identity Service", - "适用于身份认证服务Swagger授权", - "适用于身份认证服务Swagger授权", - "Applicable to the identity service Swagger authorization", - ["identity-service"]); - // Localization Service - await CreateServiceScopeAsync( - "localization-service", - "Localization Service", - "本地化管理服务", - "Localization Service", - "适用于本地化管理服务Swagger授权", - "适用于本地化管理服务Swagger授权", - "Applicable to the Localization service Swagger authorization", - ["localization-service"]); - // Message Service - await CreateServiceScopeAsync( - "message-service", - "Message Service", - "消息管理服务", - "Message Service", - "适用于消息管理服务Swagger授权", - "适用于消息管理服务Swagger授权", - "Applicable to the Message service Swagger authorization", - ["message-service"]); - // Platform Service - await CreateServiceScopeAsync( - "platform-service", - "Platform Service", - "平台管理服务", - "Platform Service", - "适用于平台管理服务Swagger授权", - "适用于平台管理服务Swagger授权", - "Applicable to the Platform service Swagger authorization", - ["platform-service"]); - // Task Service - await CreateServiceScopeAsync( - "task-service", - "Task Service", - "任务管理服务", - "Task Service", - "适用于任务管理服务Swagger授权", - "适用于任务管理服务Swagger授权", - "Applicable to the Task service Swagger authorization", - ["task-service"]); - // Webhook Service - await CreateServiceScopeAsync( - "webhook-service", - "Webhook Service", - "Webhook管理服务", - "Webhook Service", - "适用于Webhook管理服务Swagger授权", - "适用于Webhook管理服务Swagger授权", - "Applicable to the Webhook service Swagger authorization", - ["webhook-service"]); - // Wechat Service - await CreateServiceScopeAsync( - "wechat-service", - "Wechat Service", - "微信管理服务", - "Wechat Service", - "适用于微信管理服务Swagger授权", - "适用于微信管理服务Swagger授权", - "Applicable to the Wechat service Swagger authorization", - ["wechat-service"]); - // Workflow Service - await CreateServiceScopeAsync( - "workflow-service", - "Workflow Service", - "工作流管理服务", - "Workflow Service", - "适用于工作流管理服务Swagger授权", - "适用于工作流管理服务Swagger授权", - "Applicable to the Workflow service Swagger authorization", - ["workflow-service"]); - // AI Service - await CreateServiceScopeAsync( - "ai-service", - "Artificial Intelligence Service", - "AI管理服务", - "Artificial Intelligence Service", - "适用于AI管理服务Swagger授权", - "适用于AI管理服务Swagger授权", - "Applicable to the Artificial Intelligence service Swagger authorization", - ["ai-service"]); - } - - private async Task CreateApplicationAsync(string scope) - { - var configurationSection = Configuration.GetSection("OpenIddict:Applications"); - var vueClientId = configurationSection["VueAdmin:ClientId"]; - if (!vueClientId.IsNullOrWhiteSpace()) - { - Logger.LogInformation("Seeding application {vueClientId}...", vueClientId); - - var vueClientRootUrls = configurationSection.GetSection("VueAdmin:RootUrls").Get>() ?? []; - - var vueClientRedirectUrls = new List(); - var vueClientPostLogoutRedirectUrls = new List(); - vueClientRootUrls.ForEach(url => - { - vueClientRedirectUrls.Add(url.EnsureEndsWith('/')); - vueClientRedirectUrls.Add(url.EnsureEndsWith('/') + "signin-callback"); - - vueClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/')); - vueClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/') + "signout-callback"); - }); - - await CreateOrUpdateApplicationAsync( - OpenIddictConstants.ApplicationTypes.Web, - vueClientId, - OpenIddictConstants.ClientTypes.Confidential, - OpenIddictConstants.ConsentTypes.Explicit, - "Abp Vue Admin Client", - configurationSection["VueAdmin:ClientSecret"] ?? "1q2w3e*", - [OpenIddictConstants.GrantTypes.AuthorizationCode, - OpenIddictConstants.GrantTypes.Password, - OpenIddictConstants.GrantTypes.RefreshToken, - // TODO: 引用项目? - "link_user", - "impersonation"], - [OpenIddictConstants.Scopes.OpenId, - OpenIddictConstants.Scopes.Email, - OpenIddictConstants.Scopes.Roles, - OpenIddictConstants.Scopes.Address, - OpenIddictConstants.Scopes.Phone, - OpenIddictConstants.Scopes.Profile, - OpenIddictConstants.Scopes.OfflineAccess, - scope], - vueClientRedirectUrls, - vueClientPostLogoutRedirectUrls); - - var vueClientPermissions = new string[1] - { - "AbpIdentity.UserLookup" - }; - await PermissionDataSeeder.SeedAsync(ClientPermissionValueProvider.ProviderName, vueClientId, vueClientPermissions); - } - - var internalServiceClientId = configurationSection["InternalService:ClientId"]; - if (!internalServiceClientId.IsNullOrWhiteSpace()) - { - Logger.LogInformation("Seeding application {internalServiceClientId}...", internalServiceClientId); - - await CreateOrUpdateApplicationAsync( - OpenIddictConstants.ApplicationTypes.Web, - internalServiceClientId, - OpenIddictConstants.ClientTypes.Confidential, - OpenIddictConstants.ConsentTypes.Implicit, - "Abp Internal Service Client", - configurationSection["InternalService:ClientSecret"] ?? "1q2w3e*", - [OpenIddictConstants.GrantTypes.ClientCredentials], - [scope]); - } - - var oauthClientId = configurationSection["VueOAuthClient:ClientId"]; - if (!oauthClientId.IsNullOrWhiteSpace()) - { - Logger.LogInformation("Seeding application {oauthClientId}...", oauthClientId); - - var oauthClientRootUrls = configurationSection.GetSection("VueOAuthClient:RootUrls").Get>() ?? []; - - var oauthClientRedirectUrls = new List(); - var oauthClientPostLogoutRedirectUrls = new List(); - oauthClientRootUrls.ForEach(url => - { - oauthClientRedirectUrls.Add(url.EnsureEndsWith('/')); - oauthClientRedirectUrls.Add(url.EnsureEndsWith('/') + "signin-callback"); - oauthClientRedirectUrls.Add(url.EnsureEndsWith('/') + "swagger/oauth2-redirect.html"); - - oauthClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/')); - oauthClientPostLogoutRedirectUrls.Add(url.EnsureEndsWith('/') + "signout-callback"); - }); - - await CreateOrUpdateApplicationAsync( - OpenIddictConstants.ApplicationTypes.Web, - oauthClientId, - OpenIddictConstants.ClientTypes.Public, - OpenIddictConstants.ConsentTypes.Implicit, - "Abp OAuth Client", - null, - [OpenIddictConstants.GrantTypes.AuthorizationCode, - OpenIddictConstants.GrantTypes.RefreshToken, - "link_user", - "impersonation"], - [OpenIddictConstants.Scopes.OpenId, - OpenIddictConstants.Scopes.Email, - OpenIddictConstants.Scopes.Roles, - OpenIddictConstants.Scopes.Address, - OpenIddictConstants.Scopes.Phone, - OpenIddictConstants.Scopes.Profile, - OpenIddictConstants.Scopes.OfflineAccess, - scope, - "api-gateway", - "auth-server", - "admin-service", - "ai-service", - "identity-service", - "localization-service", - "message-service", - "platform-service", - "task-service", - "webhook-service", - "wechat-service", - "workflow-service"], - oauthClientRedirectUrls, - oauthClientPostLogoutRedirectUrls); - - var oauthClientPermissions = new string[1] - { - "AbpIdentity.UserLookup" - }; - await PermissionDataSeeder.SeedAsync(ClientPermissionValueProvider.ProviderName, oauthClientId, oauthClientPermissions); - } - } - - private async Task CreateServiceScopeAsync( - string name, - string displayNameDefault, - string displayNameZh, - string displayNameEn, - string descriptionDefault, - string descriptionZh, - string descriptionEn, - List? resources = null) - { - var descriptor = new OpenIddictScopeDescriptor - { - Name = name, - DisplayName = displayNameDefault, - DisplayNames = - { - [CultureInfo.GetCultureInfo("zh-Hans")] = displayNameZh, - [CultureInfo.GetCultureInfo("en")] = displayNameEn - }, - Description = descriptionDefault, - Descriptions = - { - [CultureInfo.GetCultureInfo("zh-Hans")] = descriptionZh, - [CultureInfo.GetCultureInfo("en")] = descriptionEn - }, - }; - if (resources is { Count: > 0 }) - { - descriptor.Resources.AddIfNotContains(resources); - } - - await CreateScopesAsync(descriptor); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj deleted file mode 100644 index 97c90572d..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.AuthServer.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs deleted file mode 100644 index a439d944c..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs +++ /dev/null @@ -1,1108 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20230109085530_Initial-Auth-Server")] - partial class InitialAuthServer - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs deleted file mode 100644 index aacb7d26c..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs +++ /dev/null @@ -1,738 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialAuthServer : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Required = table.Column(type: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - Regex = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RegexDescription = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ValueType = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SourceTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TargetTenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Code = table.Column(type: "varchar(95)", maxLength: 95, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsDefault = table.Column(type: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Identity = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Action = table.Column(type: "varchar(96)", maxLength: 96, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Surname = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Email = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NormalizedEmail = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - EmailConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - PasswordHash = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SecurityStamp = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsExternal = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetime(6)", nullable: true), - LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictApplications", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ClientId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientSecret = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConsentType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayNames = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Permissions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - PostLogoutRedirectUris = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RedirectUris = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Requirements = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ClientUri = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LogoUri = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictApplications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictScopes", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Descriptions = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayNames = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Resources = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserClaims", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserLogins", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ProviderKey = table.Column(type: "varchar(196)", maxLength: 196, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderDisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserTokens", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Value = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictAuthorizations", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationDate = table.Column(type: "datetime(6)", nullable: true), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Scopes = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OpenIddictTokens", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ApplicationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - AuthorizationId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationDate = table.Column(type: "datetime(6)", nullable: true), - ExpirationDate = table.Column(type: "datetime(6)", nullable: true), - Payload = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Properties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RedemptionDate = table.Column(type: "datetime(6)", nullable: true), - ReferenceId = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Subject = table.Column(type: "varchar(400)", maxLength: 400, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictTokens", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId", - column: x => x.AuthorizationId, - principalTable: "OpenIddictAuthorizations", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictApplications_ClientId", - table: "OpenIddictApplications", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type", - table: "OpenIddictAuthorizations", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictScopes_Name", - table: "OpenIddictScopes", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type", - table: "OpenIddictTokens", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_AuthorizationId", - table: "OpenIddictTokens", - column: "AuthorizationId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ReferenceId", - table: "OpenIddictTokens", - column: "ReferenceId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "OpenIddictScopes"); - - migrationBuilder.DropTable( - name: "OpenIddictTokens"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "OpenIddictAuthorizations"); - - migrationBuilder.DropTable( - name: "OpenIddictApplications"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs deleted file mode 100644 index a00082322..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.Designer.cs +++ /dev/null @@ -1,1118 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20230323062929_Upgrade-Abp-Framework-To-7.1.0")] - partial class UpgradeAbpFrameworkTo710 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs deleted file mode 100644 index 0445e64fa..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230323062929_Upgrade-Abp-Framework-To-7.1.0.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo710 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "EntityVersion", - table: "AbpUsers", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "EntityVersion", - table: "AbpRoles", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "EntityVersion", - table: "AbpOrganizationUnits", - type: "int", - nullable: false, - defaultValue: 0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "EntityVersion", - table: "AbpUsers"); - - migrationBuilder.DropColumn( - name: "EntityVersion", - table: "AbpRoles"); - - migrationBuilder.DropColumn( - name: "EntityVersion", - table: "AbpOrganizationUnits"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs deleted file mode 100644 index 43f402bf5..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.Designer.cs +++ /dev/null @@ -1,1151 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20230515095522_FixUser")] - partial class FixUser - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs deleted file mode 100644 index 8e1675e90..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230515095522_FixUser.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class FixUser : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastPasswordChangeTime", - table: "AbpUsers", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "ShouldChangePasswordOnNextLogin", - table: "AbpUsers", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.CreateTable( - name: "AbpUserDelegations", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - SourceUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TargetUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - StartTime = table.Column(type: "datetime(6)", nullable: false), - EndTime = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpUserDelegations"); - - migrationBuilder.DropColumn( - name: "LastPasswordChangeTime", - table: "AbpUsers"); - - migrationBuilder.DropColumn( - name: "ShouldChangePasswordOnNextLogin", - table: "AbpUsers"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs deleted file mode 100644 index f1d09c828..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.Designer.cs +++ /dev/null @@ -1,1169 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20231028084216_Upgrade-Abp-Framework-To-7.4.0")] - partial class UpgradeAbpFrameworkTo740 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs deleted file mode 100644 index 694ae324d..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20231028084216_Upgrade-Abp-Framework-To-7.4.0.cs +++ /dev/null @@ -1,558 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo740 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "OpenIddictTokens", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictTokens", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictTokens", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictTokens", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictScopes", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictScopes", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictScopes", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictScopes", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictAuthorizations", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictAuthorizations", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictAuthorizations", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictAuthorizations", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictApplications", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictApplications", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "OpenIddictApplications", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictApplications", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpUsers", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpUsers", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpUsers", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpUsers", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpSecurityLogs", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpSecurityLogs", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpSecurityLogs", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpSecurityLogs", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpRoles", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpRoles", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpRoles", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpRoles", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpOrganizationUnits", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpOrganizationUnits", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpOrganizationUnits", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpOrganizationUnits", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpClaimTypes", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpClaimTypes", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpClaimTypes", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpClaimTypes", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictTokens", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictTokens", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictScopes", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictScopes", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictAuthorizations", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictAuthorizations", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "OpenIddictApplications", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "OpenIddictApplications", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpUsers", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpUsers", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpSecurityLogs", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpSecurityLogs", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpRoles", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpRoles", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpOrganizationUnits", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpOrganizationUnits", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpClaimTypes", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpClaimTypes", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs deleted file mode 100644 index 6859f8036..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs +++ /dev/null @@ -1,1179 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20240413021934_Upgrade-Abp-Framework-To-8-1-0")] - partial class UpgradeAbpFrameworkTo810 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs deleted file mode 100644 index b630cd430..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo810 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "Type", - table: "OpenIddictApplications", - newName: "ClientType"); - - migrationBuilder.AddColumn( - name: "ApplicationType", - table: "OpenIddictApplications", - type: "varchar(50)", - maxLength: 50, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "JsonWebKeySet", - table: "OpenIddictApplications", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Settings", - table: "OpenIddictApplications", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ApplicationType", - table: "OpenIddictApplications"); - - migrationBuilder.DropColumn( - name: "JsonWebKeySet", - table: "OpenIddictApplications"); - - migrationBuilder.DropColumn( - name: "Settings", - table: "OpenIddictApplications"); - - migrationBuilder.RenameColumn( - name: "ClientType", - table: "OpenIddictApplications", - newName: "Type"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs deleted file mode 100644 index b94da540d..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.Designer.cs +++ /dev/null @@ -1,1234 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20240729101555_Upgrade-Abp-Framework-To-8-2-0")] - partial class UpgradeAbpFrameworkTo820 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("IpAddresses") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs deleted file mode 100644 index b7f53cb56..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240729101555_Upgrade-Abp-Framework-To-8-2-0.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo820 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpSessions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - SessionId = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Device = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DeviceInfo = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IpAddresses = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SignedIn = table.Column(type: "datetime(6)", nullable: false), - LastAccessed = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSessions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_Device", - table: "AbpSessions", - column: "Device"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_SessionId", - table: "AbpSessions", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_TenantId_UserId", - table: "AbpSessions", - columns: new[] { "TenantId", "UserId" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpSessions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs deleted file mode 100644 index 4c11ec42b..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.Designer.cs +++ /dev/null @@ -1,1178 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20250214022911_Upgrade-Abp-Framework-To-9.0.4")] - partial class UpgradeAbpFrameworkTo904 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "9.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs deleted file mode 100644 index 58f3c3432..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250214022911_Upgrade-Abp-Framework-To-9.0.4.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo904 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "CreationTime", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "CreatorId", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "DeleterId", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "DeletionTime", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "IsDeleted", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "LastModificationTime", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "LastModifierId", - table: "OpenIddictTokens"); - - migrationBuilder.DropColumn( - name: "CreationTime", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "CreatorId", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "DeleterId", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "DeletionTime", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "IsDeleted", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "LastModificationTime", - table: "OpenIddictAuthorizations"); - - migrationBuilder.DropColumn( - name: "LastModifierId", - table: "OpenIddictAuthorizations"); - - migrationBuilder.AlterColumn( - name: "IpAddresses", - table: "AbpSessions", - type: "varchar(2048)", - maxLength: 2048, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(256)", - oldMaxLength: 256, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ExtraProperties", - table: "AbpSessions", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ExtraProperties", - table: "AbpSessions"); - - migrationBuilder.AddColumn( - name: "CreationTime", - table: "OpenIddictTokens", - type: "datetime(6)", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - - migrationBuilder.AddColumn( - name: "CreatorId", - table: "OpenIddictTokens", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "DeleterId", - table: "OpenIddictTokens", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "DeletionTime", - table: "OpenIddictTokens", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "IsDeleted", - table: "OpenIddictTokens", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "LastModificationTime", - table: "OpenIddictTokens", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "LastModifierId", - table: "OpenIddictTokens", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "CreationTime", - table: "OpenIddictAuthorizations", - type: "datetime(6)", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - - migrationBuilder.AddColumn( - name: "CreatorId", - table: "OpenIddictAuthorizations", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "DeleterId", - table: "OpenIddictAuthorizations", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AddColumn( - name: "DeletionTime", - table: "OpenIddictAuthorizations", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "IsDeleted", - table: "OpenIddictAuthorizations", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "LastModificationTime", - table: "OpenIddictAuthorizations", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "LastModifierId", - table: "OpenIddictAuthorizations", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AlterColumn( - name: "IpAddresses", - table: "AbpSessions", - type: "varchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(2048)", - oldMaxLength: 2048, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs deleted file mode 100644 index 47aade662..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.Designer.cs +++ /dev/null @@ -1,1254 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20250226011251_Add-Gdpr-Module")] - partial class AddGdprModule - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "9.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Provider"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.ToTable("AbpGdprInfos", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ReadyTime") - .HasColumnType("datetime(6)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpGdprRequests", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) - .WithMany("Infos") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Navigation("Infos"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs deleted file mode 100644 index 17c39ffd4..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250226011251_Add-Gdpr-Module.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class AddGdprModule : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpGdprRequests", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ReadyTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpGdprRequests", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpGdprInfos", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RequestId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Data = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpGdprInfos", x => x.Id); - table.ForeignKey( - name: "FK_AbpGdprInfos_AbpGdprRequests_RequestId", - column: x => x.RequestId, - principalTable: "AbpGdprRequests", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpGdprInfos_RequestId", - table: "AbpGdprInfos", - column: "RequestId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpGdprRequests_UserId", - table: "AbpGdprRequests", - column: "UserId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpGdprInfos"); - - migrationBuilder.DropTable( - name: "AbpGdprRequests"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs deleted file mode 100644 index b497c5ef0..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.Designer.cs +++ /dev/null @@ -1,1262 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20250410015403_Upgrade-Abp-Framework-To-9-1-1")] - partial class UpgradeAbpFrameworkTo911 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "9.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Provider"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.ToTable("AbpGdprInfos", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ReadyTime") - .HasColumnType("datetime(6)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpGdprRequests", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) - .WithMany("Infos") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Navigation("Infos"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs deleted file mode 100644 index e853041fc..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20250410015403_Upgrade-Abp-Framework-To-9-1-1.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo911 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "CreationTime", - table: "AbpRoles", - type: "datetime(6)", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - - migrationBuilder.AddColumn( - name: "CreationTime", - table: "AbpClaimTypes", - type: "datetime(6)", - nullable: false, - defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "CreationTime", - table: "AbpRoles"); - - migrationBuilder.DropColumn( - name: "CreationTime", - table: "AbpClaimTypes"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs deleted file mode 100644 index 2d9a0b087..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.Designer.cs +++ /dev/null @@ -1,1375 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20260420064613_Upgrade-Abp-Framework-To-10-0-2")] - partial class UpgradeAbpFrameworkTo1002 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Provider"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.ToTable("AbpGdprInfos", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ReadyTime") - .HasColumnType("datetime(6)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpGdprRequests", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LastSignInTime") - .HasColumnType("datetime(6)"); - - b.Property("Leaved") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("Leaved"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.Property("CredentialId") - .HasMaxLength(1024) - .HasColumnType("varbinary(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("CredentialId"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserPasskeys", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("Password") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "Password"); - - b.ToTable("AbpUserPasswordHistories", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("longtext"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) - .WithMany("Infos") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Passkeys") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => - { - b1.Property("IdentityUserPasskeyCredentialId"); - - b1.Property("AttestationObject"); - - b1.Property("ClientDataJson"); - - b1.Property("CreatedAt"); - - b1.Property("IsBackedUp"); - - b1.Property("IsBackupEligible"); - - b1.Property("IsUserVerified"); - - b1.Property("Name"); - - b1.Property("PublicKey"); - - b1.Property("SignCount"); - - b1.PrimitiveCollection("Transports"); - - b1.HasKey("IdentityUserPasskeyCredentialId"); - - b1.ToTable("AbpUserPasskeys"); - - b1 - .ToJson("Data") - .HasColumnType("json"); - - b1.WithOwner() - .HasForeignKey("IdentityUserPasskeyCredentialId"); - }); - - b.Navigation("Data"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("PasswordHistories") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Navigation("Infos"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Passkeys"); - - b.Navigation("PasswordHistories"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs deleted file mode 100644 index 89513820f..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260420064613_Upgrade-Abp-Framework-To-10-0-2.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo1002 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Type", - table: "OpenIddictTokens", - type: "varchar(150)", - maxLength: 150, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(50)", - oldMaxLength: 50, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "FrontChannelLogoutUri", - table: "OpenIddictApplications", - type: "longtext", - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "LastSignInTime", - table: "AbpUsers", - type: "datetime(6)", - nullable: true); - - migrationBuilder.AddColumn( - name: "Leaved", - table: "AbpUsers", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - - migrationBuilder.AlterColumn( - name: "DeviceInfo", - table: "AbpSessions", - type: "varchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(64)", - oldMaxLength: 64, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserPasskeys", - columns: table => new - { - CredentialId = table.Column(type: "varbinary(1024)", maxLength: 1024, nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Data = table.Column(type: "json", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserPasskeys", x => x.CredentialId); - table.ForeignKey( - name: "FK_AbpUserPasskeys_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpUserPasswordHistories", - columns: table => new - { - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Password = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserPasswordHistories", x => new { x.UserId, x.Password }); - table.ForeignKey( - name: "FK_AbpUserPasswordHistories_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserPasskeys_UserId", - table: "AbpUserPasskeys", - column: "UserId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpUserPasskeys"); - - migrationBuilder.DropTable( - name: "AbpUserPasswordHistories"); - - migrationBuilder.DropColumn( - name: "FrontChannelLogoutUri", - table: "OpenIddictApplications"); - - migrationBuilder.DropColumn( - name: "LastSignInTime", - table: "AbpUsers"); - - migrationBuilder.DropColumn( - name: "Leaved", - table: "AbpUsers"); - - migrationBuilder.AlterColumn( - name: "Type", - table: "OpenIddictTokens", - type: "varchar(50)", - maxLength: 50, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(150)", - oldMaxLength: 150, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "DeviceInfo", - table: "AbpSessions", - type: "varchar(64)", - maxLength: 64, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(256)", - oldMaxLength: 256, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs deleted file mode 100644 index fbcb63fe7..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.Designer.cs +++ /dev/null @@ -1,1417 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - [Migration("20260530061141_Add-Identity-User-Inactive")] - partial class AddIdentityUserInactive - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Provider"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.ToTable("AbpGdprInfos", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ReadyTime") - .HasColumnType("datetime(6)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpGdprRequests", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Identity.IdentityUserInactive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeactivatedTime") - .HasColumnType("datetime(6)"); - - b.Property("LastNotificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastSignInTime") - .HasColumnType("datetime(6)"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpUserInactives", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LastSignInTime") - .HasColumnType("datetime(6)"); - - b.Property("Leaved") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("Leaved"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.Property("CredentialId") - .HasMaxLength(1024) - .HasColumnType("varbinary(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("CredentialId"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserPasskeys", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("Password") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "Password"); - - b.ToTable("AbpUserPasswordHistories", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("longtext"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) - .WithMany("Infos") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Passkeys") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => - { - b1.Property("IdentityUserPasskeyCredentialId"); - - b1.Property("AttestationObject"); - - b1.Property("ClientDataJson"); - - b1.Property("CreatedAt"); - - b1.Property("IsBackedUp"); - - b1.Property("IsBackupEligible"); - - b1.Property("IsUserVerified"); - - b1.Property("Name"); - - b1.Property("PublicKey"); - - b1.Property("SignCount"); - - b1.PrimitiveCollection("Transports"); - - b1.HasKey("IdentityUserPasskeyCredentialId"); - - b1.ToTable("AbpUserPasskeys"); - - b1 - .ToJson("Data") - .HasColumnType("json"); - - b1.WithOwner() - .HasForeignKey("IdentityUserPasskeyCredentialId"); - }); - - b.Navigation("Data"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("PasswordHistories") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Navigation("Infos"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Passkeys"); - - b.Navigation("PasswordHistories"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs deleted file mode 100644 index 8569306ba..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20260530061141_Add-Identity-User-Inactive.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations -{ - /// - public partial class AddIdentityUserInactive : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpUserInactives", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastSignInTime = table.Column(type: "datetime(6)", nullable: false), - LastNotificationTime = table.Column(type: "datetime(6)", nullable: true), - Status = table.Column(type: "int", nullable: false), - DeactivatedTime = table.Column(type: "datetime(6)", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserInactives", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserInactives_TenantId_UserId", - table: "AbpUserInactives", - columns: new[] { "TenantId", "UserId" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpUserInactives"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index fa5ea93bf..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,1414 +0,0 @@ -// -using System; -using LY.MicroService.AuthServer.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.AuthServer.DbMigrator.Migrations -{ - [DbContext(typeof(AuthServerMigrationsDbContext))] - partial class AuthServerMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Data") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Provider"); - - b.Property("RequestId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("RequestId"); - - b.ToTable("AbpGdprInfos", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ReadyTime") - .HasColumnType("datetime(6)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpGdprRequests", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Identity.IdentityUserInactive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeactivatedTime") - .HasColumnType("datetime(6)"); - - b.Property("LastNotificationTime") - .HasColumnType("datetime(6)"); - - b.Property("LastSignInTime") - .HasColumnType("datetime(6)"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpUserInactives", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Required") - .HasColumnType("tinyint(1)"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("SourceTenantId") - .HasColumnType("char(36)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("TargetTenantId") - .HasColumnType("char(36)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)") - .HasColumnName("IsActive"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastPasswordChangeTime") - .HasColumnType("datetime(6)"); - - b.Property("LastSignInTime") - .HasColumnType("datetime(6)"); - - b.Property("Leaved") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("Leaved"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SecurityStamp"); - - b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("varchar(196)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.Property("CredentialId") - .HasMaxLength(1024) - .HasColumnType("varbinary(1024)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("CredentialId"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserPasskeys", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("Password") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "Password"); - - b.ToTable("AbpUserPasswordHistories", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("varchar(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("longtext"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ClientUri") - .HasColumnType("longtext"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutUri") - .HasColumnType("longtext"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("JsonWebKeySet") - .HasColumnType("longtext"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasColumnType("longtext"); - - b.Property("Permissions") - .HasColumnType("longtext"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedirectUris") - .HasColumnType("longtext"); - - b.Property("Requirements") - .HasColumnType("longtext"); - - b.Property("Settings") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Scopes") - .HasColumnType("longtext"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Descriptions") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .HasColumnType("longtext"); - - b.Property("DisplayNames") - .HasColumnType("longtext"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("Resources") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ApplicationId") - .HasColumnType("char(36)"); - - b.Property("AuthorizationId") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Payload") - .HasColumnType("longtext"); - - b.Property("Properties") - .HasColumnType("longtext"); - - b.Property("RedemptionDate") - .HasColumnType("datetime(6)"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("varchar(400)"); - - b.Property("Type") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprInfo", b => - { - b.HasOne("LINGYUN.Abp.Gdpr.GdprRequest", null) - .WithMany("Infos") - .HasForeignKey("RequestId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasskey", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Passkeys") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.OwnsOne("Volo.Abp.Identity.IdentityPasskeyData", "Data", b1 => - { - b1.Property("IdentityUserPasskeyCredentialId"); - - b1.Property("AttestationObject"); - - b1.Property("ClientDataJson"); - - b1.Property("CreatedAt"); - - b1.Property("IsBackedUp"); - - b1.Property("IsBackupEligible"); - - b1.Property("IsUserVerified"); - - b1.Property("Name"); - - b1.Property("PublicKey"); - - b1.Property("SignCount"); - - b1.PrimitiveCollection("Transports"); - - b1.HasKey("IdentityUserPasskeyCredentialId"); - - b1.ToTable("AbpUserPasskeys"); - - b1 - .ToJson("Data") - .HasColumnType("json"); - - b1.WithOwner() - .HasForeignKey("IdentityUserPasskeyCredentialId"); - }); - - b.Navigation("Data"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("PasswordHistories") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) - .WithMany() - .HasForeignKey("ApplicationId"); - - b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) - .WithMany() - .HasForeignKey("AuthorizationId"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Gdpr.GdprRequest", b => - { - b.Navigation("Infos"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Passkeys"); - - b.Navigation("PasswordHistories"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.EN.md deleted file mode 100644 index 3d965dc2c..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,76 +0,0 @@ -# LY.MicroService.AuthServer.EntityFrameworkCore - -Authentication server database migration module, providing database migration functionality required by the authentication server. - -[简体中文](./README.md) - -## Features - -* Integrated OpenIddict authentication framework database migrations -* Integrated ABP Identity module database migrations -* Integrated ABP permission management module database migrations -* Integrated ABP settings management module database migrations -* Integrated ABP feature management module database migrations -* Integrated ABP SaaS multi-tenant module database migrations -* Integrated text templating module database migrations -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpAuthorizationModule), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpOpenIddictEntityFrameworkCoreModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -public class YourModule : AbpModule -{ - // other -} -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "AuthServerDbMigrator": "your-database-connection-string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure AuthServerDbMigrator connection string in appsettings.json - -2. Add Database Context - ```csharp - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL(); - }); - } - ``` - -3. Execute Database Migration - * Use EF Core CLI tools to execute migrations - ```bash - dotnet ef database update - ``` - -## Notes - -* Ensure the database connection string includes the correct permissions to create and modify database tables -* It's recommended to backup the database before executing migrations -* Migration scripts will automatically handle dependencies between modules diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.md deleted file mode 100644 index a29091af8..000000000 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# LY.MicroService.AuthServer.EntityFrameworkCore - -认证服务器数据库迁移模块,提供认证服务器所需的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成OpenIddict认证框架的数据库迁移 -* 集成ABP Identity模块的数据库迁移 -* 集成ABP权限管理模块的数据库迁移 -* 集成ABP设置管理模块的数据库迁移 -* 集成ABP特性管理模块的数据库迁移 -* 集成ABP SaaS多租户模块的数据库迁移 -* 集成文本模板模块的数据库迁移 -* 支持MySQL数据库 - -## 模块引用 - -```csharp -[DependsOn( - typeof(AbpAuthorizationModule), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpOpenIddictEntityFrameworkCoreModule), - typeof(AbpIdentityEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -public class YourModule : AbpModule -{ - // other -} -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "AuthServerDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置AuthServerDbMigrator连接字符串 - -2. 添加数据库上下文 - ```csharp - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL(); - }); - } - ``` - -3. 执行数据库迁移 - * 使用EF Core命令行工具执行迁移 - ```bash - dotnet ef database update - ``` - -## 注意事项 - -* 确保数据库连接字符串中包含正确的权限,以便能够创建和修改数据库表 -* 在执行迁移之前,建议先备份数据库 -* 迁移脚本会自动处理模块间的依赖关系 diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs deleted file mode 100644 index 4d801a99c..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.BackendAdmin.DbMigrator; - -public class BackendAdminDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public BackendAdminDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(BackendAdminDbMigratorHostedService).Assembly; - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs deleted file mode 100644 index bdd290cdf..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.BackendAdmin.DbMigrator; -public partial class BackendAdminDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs deleted file mode 100644 index 806d75ad8..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs +++ /dev/null @@ -1,57 +0,0 @@ -using LINGYUN.Abp.Account; -using LINGYUN.Abp.Auditing; -using LINGYUN.Abp.BlobManagement; -using LINGYUN.Abp.CachingManagement; -using LINGYUN.Abp.DataProtectionManagement; -using LINGYUN.Abp.FeatureManagement; -using LINGYUN.Abp.Gdpr; -using LINGYUN.Abp.Identity; -using LINGYUN.Abp.LocalizationManagement; -using LINGYUN.Abp.MessageService; -using LINGYUN.Abp.Notifications; -using LINGYUN.Abp.OpenIddict; -using LINGYUN.Abp.PermissionManagement; -using LINGYUN.Abp.ProjectManagement; -using LINGYUN.Abp.RulesEngineManagement; -using LINGYUN.Abp.Saas; -using LINGYUN.Abp.SettingManagement; -using LINGYUN.Abp.TaskManagement; -using LINGYUN.Abp.TextTemplating; -using LINGYUN.Abp.WebhooksManagement; -using LINGYUN.Platform; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.BackendAdmin.DbMigrator; - -[DependsOn( - typeof(AbpSettingManagementApplicationContractsModule), - typeof(AbpAccountApplicationContractsModule), - typeof(AbpAuditingApplicationContractsModule), - typeof(AbpCachingManagementApplicationContractsModule), - typeof(AbpDataProtectionManagementApplicationContractsModule), - typeof(AbpFeatureManagementApplicationContractsModule), - typeof(AbpGdprApplicationContractsModule), - typeof(AbpIdentityApplicationContractsModule), - typeof(AbpLocalizationManagementApplicationContractsModule), - typeof(AbpOpenIddictApplicationContractsModule), - typeof(AbpBlobManagementApplicationContractsModule), - typeof(AbpPermissionManagementApplicationContractsModule), - typeof(PlatformApplicationContractModule), - typeof(AbpProjectManagementApplicationContractsModule), - typeof(AbpMessageServiceApplicationContractsModule), - typeof(AbpNotificationsApplicationContractsModule), - typeof(RulesEngineManagementApplicationContractsModule), - typeof(AbpSaasApplicationContractsModule), - typeof(TaskManagementApplicationContractsModule), - typeof(AbpTextTemplatingApplicationContractsModule), - typeof(WebhooksManagementApplicationContractsModule))] - -[DependsOn( - typeof(BackendAdminMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) - )] -public partial class BackendAdminDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj deleted file mode 100644 index deba1dc7b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - Debug;Release - AnyCPU - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs deleted file mode 100644 index 86f13fa07..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.BackendAdmin.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.BackendAdmin.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.BackendAdmin.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index 4e71ebf53..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.BackendAdmin.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.EN.md deleted file mode 100644 index d0fb379bc..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.EN.md +++ /dev/null @@ -1,98 +0,0 @@ -# LY.MicroService.BackendAdmin.DbMigrator - -Backend Administration System Database Migration Console Application, used for executing database migrations and initializing seed data for the backend administration system. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Integrated Feature Management -* Integrated Setting Management -* Integrated Permission Management -* Integrated Localization Management -* Integrated Cache Management -* Integrated Auditing -* Integrated Text Templating -* Integrated Identity Authentication -* Integrated IdentityServer -* Integrated OpenIddict -* Integrated Platform Management -* Integrated Object Storage Management -* Integrated Notification System -* Integrated Message Service -* Integrated Task Management -* Integrated Webhooks Management - -## Module Dependencies - -```csharp -[DependsOn( - typeof(BackendAdminMigrationsEntityFrameworkCoreModule), - typeof(AbpFeatureManagementApplicationContractsModule), - typeof(AbpSettingManagementApplicationContractsModule), - typeof(AbpPermissionManagementApplicationContractsModule), - typeof(AbpLocalizationManagementApplicationContractsModule), - typeof(AbpCachingManagementApplicationContractsModule), - typeof(AbpAuditingApplicationContractsModule), - typeof(AbpTextTemplatingApplicationContractsModule), - typeof(AbpIdentityApplicationContractsModule), - typeof(AbpIdentityServerApplicationContractsModule), - typeof(AbpOpenIddictApplicationContractsModule), - typeof(PlatformApplicationContractModule), - typeof(AbpOssManagementApplicationContractsModule), - typeof(AbpNotificationsApplicationContractsModule), - typeof(AbpMessageServiceApplicationContractsModule), - typeof(TaskManagementApplicationContractsModule), - typeof(WebhooksManagementApplicationContractsModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "BackendAdminDbMigrator": "Your database connection string" - }, - "IdentityServer": { - "Clients": { - "BackendAdmin_App": { - "ClientId": "BackendAdmin_App" - } - } - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure BackendAdminDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) -* [IdentityServer4 Documentation](https://identityserver4.readthedocs.io) -* [OpenIddict Documentation](https://documentation.openiddict.com) diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.md deleted file mode 100644 index cfedda71c..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# LY.MicroService.BackendAdmin.DbMigrator - -后台管理系统数据库迁移控制台应用程序,用于执行后台管理系统的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 集成特性管理功能 -* 集成设置管理功能 -* 集成权限管理功能 -* 集成本地化管理功能 -* 集成缓存管理功能 -* 集成审计日志功能 -* 集成文本模板功能 -* 集成身份认证功能 -* 集成IdentityServer功能 -* 集成OpenIddict功能 -* 集成平台管理功能 -* 集成对象存储功能 -* 集成通知系统功能 -* 集成消息服务功能 -* 集成任务管理功能 -* 集成Webhooks管理功能 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(BackendAdminMigrationsEntityFrameworkCoreModule), - typeof(AbpFeatureManagementApplicationContractsModule), - typeof(AbpSettingManagementApplicationContractsModule), - typeof(AbpPermissionManagementApplicationContractsModule), - typeof(AbpLocalizationManagementApplicationContractsModule), - typeof(AbpCachingManagementApplicationContractsModule), - typeof(AbpAuditingApplicationContractsModule), - typeof(AbpTextTemplatingApplicationContractsModule), - typeof(AbpIdentityApplicationContractsModule), - typeof(AbpIdentityServerApplicationContractsModule), - typeof(AbpOpenIddictApplicationContractsModule), - typeof(PlatformApplicationContractModule), - typeof(AbpOssManagementApplicationContractsModule), - typeof(AbpNotificationsApplicationContractsModule), - typeof(AbpMessageServiceApplicationContractsModule), - typeof(TaskManagementApplicationContractsModule), - typeof(WebhooksManagementApplicationContractsModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "BackendAdminDbMigrator": "你的数据库连接字符串" - }, - "IdentityServer": { - "Clients": { - "BackendAdmin_App": { - "ClientId": "BackendAdmin_App" - } - } - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置BackendAdminDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) -* [IdentityServer4文档](https://identityserver4.readthedocs.io) -* [OpenIddict文档](https://documentation.openiddict.com) diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs deleted file mode 100644 index 243674b95..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -public class AdminServiceDataSeeder : ITransientDependency -{ - protected ILogger Logger { get; } - protected ICurrentTenant CurrentTenant { get; } - protected IPermissionDefinitionManager PermissionDefinitionManager { get; } - protected IPermissionDataSeeder PermissionDataSeeder { get; } - - public AdminServiceDataSeeder( - IPermissionDefinitionManager permissionDefinitionManager, - IPermissionDataSeeder permissionDataSeeder, - ICurrentTenant currentTenant) - { - PermissionDefinitionManager = permissionDefinitionManager; - PermissionDataSeeder = permissionDataSeeder; - CurrentTenant = currentTenant; - - Logger = NullLogger.Instance; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - using (CurrentTenant.Change(context.TenantId)) - { - await SeedAdminRolePermissionsAsync(context); - } - } - - private async Task SeedAdminRolePermissionsAsync(DataSeedContext context) - { - Logger.LogInformation("Seeding the default role permissions..."); - - var multiTenancySide = CurrentTenant.GetMultiTenancySide(); - var permissionNames = (await PermissionDefinitionManager.GetPermissionsAsync()) - .Where(p => p.MultiTenancySide.HasFlag(multiTenancySide)) - .Where(p => !p.Providers.Any() || p.Providers.Contains(RolePermissionValueProvider.ProviderName)) - .Select(p => p.Name) - .ToArray(); - - await PermissionDataSeeder.SeedAsync( - RolePermissionValueProvider.ProviderName, - "admin", - permissionNames, - context?.TenantId - ); - - Logger.LogInformation("Seed default role permissions completed."); - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs deleted file mode 100644 index 5f8ef58db..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Microsoft.Extensions.Logging; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -public class BackendAdminDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase -{ - protected AdminServiceDataSeeder DataSeeder { get; } - - public BackendAdminDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory, - AdminServiceDataSeeder dataSeeder) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) - { - // 新租户数据种子 - var context = new DataSeedContext(eventData.Id); - if (eventData.Properties != null) - { - foreach (var property in eventData.Properties) - { - context.WithProperty(property.Key, property.Value); - } - } - - await DataSeeder.SeedAsync(context); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs deleted file mode 100644 index f86e34904..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -public class BackendAdminDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - protected AdminServiceDataSeeder DataSeeder { get; } - - public BackendAdminDbMigrationService( - AdminServiceDataSeeder dataSeeder, - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task SeedAsync() - { - // DbMigrator迁移数据种子 - await DataSeeder.SeedAsync(new DataSeedContext()); - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs deleted file mode 100644 index f8bd45976..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs +++ /dev/null @@ -1,43 +0,0 @@ -using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.PermissionManagement; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -[ConnectionStringName("BackendAdminDbMigrator")] -public class BackendAdminMigrationsDbContext : AbpDbContext -{ - public BackendAdminMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureSaas(); - modelBuilder.ConfigureTextTemplating(); - modelBuilder.ConfigureFeatureManagement(); - modelBuilder.ConfigureSettingManagement(); - modelBuilder.ConfigurePermissionManagement(); - modelBuilder.ConfigureDataProtectionManagement(); - - modelBuilder.Entity(b => - { - var maxResourceNameLength = modelBuilder.IsUsingMySQL() ? 128 : PermissionGrantConsts.MaxResourceNameLength; - var maxResourceKeyLength = modelBuilder.IsUsingMySQL() ? 128 : PermissionGrantConsts.MaxResourceKeyLength; - - b.Property(x => x.ResourceName).HasMaxLength(maxResourceNameLength).IsRequired(); - b.Property(x => x.ResourceKey).HasMaxLength(maxResourceKeyLength).IsRequired(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs deleted file mode 100644 index b06cd9f2b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public BackendAdminMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new BackendAdminMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.BackendAdmin.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index dbefbdb2d..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,42 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.PermissionManagement.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpDataDbMigratorModule) - )] -public class BackendAdminMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj deleted file mode 100644 index 036900c3b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.BackendAdmin.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs deleted file mode 100644 index a0eb97372..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs +++ /dev/null @@ -1,524 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20230109083613_Initial-Backend-Admin")] - partial class InitialBackendAdmin - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs deleted file mode 100644 index ac15818eb..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs +++ /dev/null @@ -1,388 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialBackendAdmin : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpEditions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEditions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatureGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatures", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), - IsAvailableToHost = table.Column(type: "tinyint(1)", nullable: false), - AllowedProviders = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ValueType = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatures", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpFeatureValues", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissionGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpPermissions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - MultiTenancySide = table.Column(type: "tinyint unsigned", nullable: false), - Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpTextTemplates", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Culture = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTextTemplates", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - EnableTime = table.Column(type: "datetime(6)", nullable: true), - DisableTime = table.Column(type: "datetime(6)", nullable: true), - EditionId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenants", x => x.Id); - table.ForeignKey( - name: "FK_AbpTenants_AbpEditions_EditionId", - column: x => x.EditionId, - principalTable: "AbpEditions", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEditions_DisplayName", - table: "AbpEditions", - column: "DisplayName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureGroups_Name", - table: "AbpFeatureGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_GroupName", - table: "AbpFeatures", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_Name", - table: "AbpFeatures", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGroups_Name", - table: "AbpPermissionGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_GroupName", - table: "AbpPermissions", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_Name", - table: "AbpPermissions", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_EditionId", - table: "AbpTenants", - column: "EditionId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates", - columns: new[] { "TenantId", "Name" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpFeatureGroups"); - - migrationBuilder.DropTable( - name: "AbpFeatures"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpPermissionGroups"); - - migrationBuilder.DropTable( - name: "AbpPermissions"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpTextTemplates"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpEditions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs deleted file mode 100644 index a71957bf8..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.Designer.cs +++ /dev/null @@ -1,578 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20230304062910_Add-Text-Template-Definition")] - partial class AddTextTemplateDefinition - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs deleted file mode 100644 index e79e1d89d..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304062910_Add-Text-Template-Definition.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class AddTextTemplateDefinition : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpTextTemplateDefinitions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsLayout = table.Column(type: "tinyint(1)", nullable: false), - Layout = table.Column(type: "varchar(60)", maxLength: 60, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsInlineLocalized = table.Column(type: "tinyint(1)", nullable: false), - DefaultCultureName = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RenderEngine = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTextTemplateDefinitions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpTextTemplateDefinitions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs deleted file mode 100644 index a3262f61b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.Designer.cs +++ /dev/null @@ -1,581 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20230304083526_Add-IsStatic-Field")] - partial class AddIsStaticField - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs deleted file mode 100644 index e0e6e8290..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230304083526_Add-IsStatic-Field.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class AddIsStaticField : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsStatic", - table: "AbpTextTemplateDefinitions", - type: "tinyint(1)", - nullable: false, - defaultValue: false); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsStatic", - table: "AbpTextTemplateDefinitions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs deleted file mode 100644 index 2f4edfaca..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.Designer.cs +++ /dev/null @@ -1,587 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20230323070528_Upgrade-Abp-Framework-To-7.1.0")] - partial class UpgradeAbpFrameworkTo710 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs deleted file mode 100644 index f8de33e51..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230323070528_Upgrade-Abp-Framework-To-7.1.0.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo710 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "EntityVersion", - table: "AbpTenants", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "EntityVersion", - table: "AbpEditions", - type: "int", - nullable: false, - defaultValue: 0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "EntityVersion", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "EntityVersion", - table: "AbpEditions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs deleted file mode 100644 index 98b6ef019..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.Designer.cs +++ /dev/null @@ -1,647 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20231028084002_Upgrade-Abp-Framework-To-7.4.0")] - partial class UpgradeAbpFrameworkTo740 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs deleted file mode 100644 index 06035371f..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20231028084002_Upgrade-Abp-Framework-To-7.4.0.cs +++ /dev/null @@ -1,247 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo740 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AbpTextTemplateDefinitions", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpTextTemplateDefinitions", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpTextTemplateDefinitions", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpTextTemplateDefinitions", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "LocalizationResourceName", - table: "AbpTextTemplateDefinitions", - type: "varchar(64)", - maxLength: 64, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpTenants", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpTenants", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpTenants", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpTenants", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpEditions", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpEditions", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AbpEditions", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpEditions", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpSettingDefinitions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), - Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsInherited = table.Column(type: "tinyint(1)", nullable: false), - IsEncrypted = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettingDefinitions_Name", - table: "AbpSettingDefinitions", - column: "Name", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpSettingDefinitions"); - - migrationBuilder.DropColumn( - name: "LocalizationResourceName", - table: "AbpTextTemplateDefinitions"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpTextTemplateDefinitions", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpTextTemplateDefinitions", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpTenants", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpTenants", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AbpEditions", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AbpEditions", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs deleted file mode 100644 index 717da21f8..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.Designer.cs +++ /dev/null @@ -1,647 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20240218002657_Upgrade-Abp-Framework-To-8.0.3")] - partial class UpgradeAbpFrameworkTo803 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs deleted file mode 100644 index 314c3d9aa..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240218002657_Upgrade-Abp-Framework-To-8.0.3.cs +++ /dev/null @@ -1,70 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo803 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Providers", - table: "AbpSettingDefinitions", - type: "varchar(1024)", - maxLength: 1024, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "DefaultValue", - table: "AbpSettingDefinitions", - type: "varchar(2048)", - maxLength: 2048, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(256)", - oldMaxLength: 256, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Providers", - table: "AbpSettingDefinitions", - type: "varchar(128)", - maxLength: 128, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(1024)", - oldMaxLength: 1024, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "DefaultValue", - table: "AbpSettingDefinitions", - type: "varchar(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(2048)", - oldMaxLength: 2048, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs deleted file mode 100644 index d8d5ecbbe..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs +++ /dev/null @@ -1,653 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20240413021854_Upgrade-Abp-Framework-To-8-1-0")] - partial class UpgradeAbpFrameworkTo810 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs deleted file mode 100644 index ae399c93e..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo810 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "NormalizedName", - table: "AbpTenants", - type: "varchar(64)", - maxLength: 64, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_NormalizedName", - table: "AbpTenants", - column: "NormalizedName"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AbpTenants_NormalizedName", - table: "AbpTenants"); - - migrationBuilder.DropColumn( - name: "NormalizedName", - table: "AbpTenants"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs deleted file mode 100644 index d63a7caf3..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.Designer.cs +++ /dev/null @@ -1,932 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20240515073346_Add-Data-Protected-Module")] - partial class AddDataProtectedModule - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.Property("ValueRange") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("ValueRange"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs deleted file mode 100644 index fd5da263a..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515073346_Add-Data-Protected-Module.cs +++ /dev/null @@ -1,179 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class AddDataProtectedModule : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuthEntitites", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TypeFullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsAuditEnabled = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthEntitites", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuthEntityProperties", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TypeFullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ValueRange = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TypeInfoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthEntityProperties", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuthEntityProperties_AbpAuthEntitites_TypeInfoId", - column: x => x.TypeInfoId, - principalTable: "AbpAuthEntitites", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuthOrganizationUnitEntityRules", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrgId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - OrgCode = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - Operation = table.Column(type: "int", nullable: false), - FilterGroup = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - EntityTypeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - EntityTypeFullName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthOrganizationUnitEntityRules", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuthOrganizationUnitEntityRules_AbpAuthEntitites_EntityTy~", - column: x => x.EntityTypeId, - principalTable: "AbpAuthEntitites", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuthRoleEntityRules", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - Operation = table.Column(type: "int", nullable: false), - FilterGroup = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - EntityTypeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - EntityTypeFullName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthRoleEntityRules", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuthRoleEntityRules_AbpAuthEntitites_EntityTypeId", - column: x => x.EntityTypeId, - principalTable: "AbpAuthEntitites", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuthEntitites_TypeFullName", - table: "AbpAuthEntitites", - column: "TypeFullName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuthEntityProperties_TypeInfoId_TypeFullName", - table: "AbpAuthEntityProperties", - columns: new[] { "TypeInfoId", "TypeFullName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuthOrganizationUnitEntityRules_EntityTypeId", - table: "AbpAuthOrganizationUnitEntityRules", - column: "EntityTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuthRoleEntityRules_EntityTypeId", - table: "AbpAuthRoleEntityRules", - column: "EntityTypeId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuthEntityProperties"); - - migrationBuilder.DropTable( - name: "AbpAuthOrganizationUnitEntityRules"); - - migrationBuilder.DropTable( - name: "AbpAuthRoleEntityRules"); - - migrationBuilder.DropTable( - name: "AbpAuthEntitites"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs deleted file mode 100644 index 8beb165c3..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.Designer.cs +++ /dev/null @@ -1,942 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20240515092715_Add-Allow-Properties")] - partial class AddAllowProperties - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.Property("ValueRange") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("ValueRange"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AllowProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AllowProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs deleted file mode 100644 index 89acc7c5a..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240515092715_Add-Allow-Properties.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class AddAllowProperties : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "AllowProperties", - table: "AbpAuthRoleEntityRules", - type: "varchar(512)", - maxLength: 512, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "AllowProperties", - table: "AbpAuthOrganizationUnitEntityRules", - type: "varchar(512)", - maxLength: 512, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "AllowProperties", - table: "AbpAuthRoleEntityRules"); - - migrationBuilder.DropColumn( - name: "AllowProperties", - table: "AbpAuthOrganizationUnitEntityRules"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs deleted file mode 100644 index bc41c6d64..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.Designer.cs +++ /dev/null @@ -1,938 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20240527092536_Remote-Tenant-Id-With-Text-Template")] - partial class RemoteTenantIdWithTextTemplate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.Property("ValueRange") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("ValueRange"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AllowProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AllowProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs deleted file mode 100644 index 31949421b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240527092536_Remote-Tenant-Id-With-Text-Template.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class RemoteTenantIdWithTextTemplate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates"); - - migrationBuilder.DropColumn( - name: "TenantId", - table: "AbpTextTemplates"); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates", - column: "Name"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates"); - - migrationBuilder.AddColumn( - name: "TenantId", - table: "AbpTextTemplates", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_Text_Template_Name", - table: "AbpTextTemplates", - columns: new[] { "TenantId", "Name" }); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs deleted file mode 100644 index 1ffc3e9a9..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.Designer.cs +++ /dev/null @@ -1,1052 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20250410015324_Upgrade-Abp-Framework-To-9-1-1")] - partial class UpgradeAbpFrameworkTo911 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "9.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("PropertyInfoId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("PropertyInfoId", "Name"); - - b.ToTable("AbpAuthEntityEnums", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("JavaScriptType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("JavaScriptType"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Strategy") - .HasColumnType("int"); - - b.Property("SubjectId") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("SubjectId"); - - b.Property("SubjectName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("SubjectName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpAuthSubjectStrategys", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") - .WithMany("Enums") - .HasForeignKey("PropertyInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PropertyInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Navigation("Enums"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs deleted file mode 100644 index d7ea7f49c..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20250410015324_Upgrade-Abp-Framework-To-9-1-1.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo911 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ValueRange", - table: "AbpAuthEntityProperties"); - - migrationBuilder.RenameColumn( - name: "AllowProperties", - table: "AbpAuthRoleEntityRules", - newName: "AccessedProperties"); - - migrationBuilder.RenameColumn( - name: "AllowProperties", - table: "AbpAuthOrganizationUnitEntityRules", - newName: "AccessedProperties"); - - migrationBuilder.AddColumn( - name: "JavaScriptType", - table: "AbpAuthEntityProperties", - type: "varchar(256)", - maxLength: 256, - nullable: false, - defaultValue: "") - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuthEntityEnums", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(10)", maxLength: 10, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PropertyInfoId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthEntityEnums", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuthEntityEnums_AbpAuthEntityProperties_PropertyInfoId", - column: x => x.PropertyInfoId, - principalTable: "AbpAuthEntityProperties", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpAuthSubjectStrategys", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - SubjectName = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SubjectId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Strategy = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuthSubjectStrategys", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuthEntityEnums_PropertyInfoId_Name", - table: "AbpAuthEntityEnums", - columns: new[] { "PropertyInfoId", "Name" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuthEntityEnums"); - - migrationBuilder.DropTable( - name: "AbpAuthSubjectStrategys"); - - migrationBuilder.DropColumn( - name: "JavaScriptType", - table: "AbpAuthEntityProperties"); - - migrationBuilder.RenameColumn( - name: "AccessedProperties", - table: "AbpAuthRoleEntityRules", - newName: "AllowProperties"); - - migrationBuilder.RenameColumn( - name: "AccessedProperties", - table: "AbpAuthOrganizationUnitEntityRules", - newName: "AllowProperties"); - - migrationBuilder.AddColumn( - name: "ValueRange", - table: "AbpAuthEntityProperties", - type: "varchar(512)", - maxLength: 512, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs deleted file mode 100644 index e6c6f9c1b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.Designer.cs +++ /dev/null @@ -1,1102 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20260420064540_Upgrade-Abp-Framework-To-10-0-2")] - partial class UpgradeAbpFrameworkTo1002 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("PropertyInfoId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("PropertyInfoId", "Name"); - - b.ToTable("AbpAuthEntityEnums", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("JavaScriptType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("JavaScriptType"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Strategy") - .HasColumnType("int"); - - b.Property("SubjectId") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("SubjectId"); - - b.Property("SubjectName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("SubjectName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpAuthSubjectStrategys", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("ManagementPermissionName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ResourceName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("ResourceName", "Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceKey") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ResourceName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpResourcePermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") - .WithMany("Enums") - .HasForeignKey("PropertyInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PropertyInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Navigation("Enums"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs deleted file mode 100644 index d02701742..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260420064540_Upgrade-Abp-Framework-To-10-0-2.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo1002 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AbpPermissions_Name", - table: "AbpPermissions"); - - migrationBuilder.AlterColumn( - name: "GroupName", - table: "AbpPermissions", - type: "varchar(128)", - maxLength: 128, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ManagementPermissionName", - table: "AbpPermissions", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ResourceName", - table: "AbpPermissions", - type: "varchar(256)", - maxLength: 256, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpResourcePermissionGrants", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceKey = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpResourcePermissionGrants", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_ResourceName_Name", - table: "AbpPermissions", - columns: new[] { "ResourceName", "Name" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", - table: "AbpResourcePermissionGrants", - columns: new[] { "TenantId", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpResourcePermissionGrants"); - - migrationBuilder.DropIndex( - name: "IX_AbpPermissions_ResourceName_Name", - table: "AbpPermissions"); - - migrationBuilder.DropColumn( - name: "ManagementPermissionName", - table: "AbpPermissions"); - - migrationBuilder.DropColumn( - name: "ResourceName", - table: "AbpPermissions"); - - migrationBuilder.UpdateData( - table: "AbpPermissions", - keyColumn: "GroupName", - keyValue: null, - column: "GroupName", - value: ""); - - migrationBuilder.AlterColumn( - name: "GroupName", - table: "AbpPermissions", - type: "varchar(128)", - maxLength: 128, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_Name", - table: "AbpPermissions", - column: "Name", - unique: true); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs deleted file mode 100644 index 9e0d66ea4..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.Designer.cs +++ /dev/null @@ -1,1102 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - [Migration("20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant")] - partial class FixMySqlIndexKeyTooLangForResourcePermissionGrant - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("PropertyInfoId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("PropertyInfoId", "Name"); - - b.ToTable("AbpAuthEntityEnums", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("JavaScriptType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("JavaScriptType"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Strategy") - .HasColumnType("int"); - - b.Property("SubjectId") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("SubjectId"); - - b.Property("SubjectName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("SubjectName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpAuthSubjectStrategys", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("ManagementPermissionName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ResourceName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("ResourceName", "Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceKey") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ResourceName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpResourcePermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") - .WithMany("Enums") - .HasForeignKey("PropertyInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PropertyInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Navigation("Enums"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs deleted file mode 100644 index 0fa91ba09..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20260626032421_Fix-MySql-Index-Key-Too-Lang-For-Resource-Permission-Grant.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - /// - public partial class FixMySqlIndexKeyTooLangForResourcePermissionGrant : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", - table: "AbpResourcePermissionGrants"); - - migrationBuilder.AlterColumn( - name: "ResourceName", - table: "AbpResourcePermissionGrants", - type: "varchar(128)", - maxLength: 128, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(256)", - oldMaxLength: 256) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ResourceKey", - table: "AbpResourcePermissionGrants", - type: "varchar(128)", - maxLength: 128, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(256)", - oldMaxLength: 256) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", - table: "AbpResourcePermissionGrants", - columns: new[] { "TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", - table: "AbpResourcePermissionGrants"); - - migrationBuilder.AlterColumn( - name: "ResourceName", - table: "AbpResourcePermissionGrants", - type: "varchar(256)", - maxLength: 256, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ResourceKey", - table: "AbpResourcePermissionGrants", - type: "varchar(256)", - maxLength: 256, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(128)", - oldMaxLength: 128) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpResourcePermissionGrants_TenantId_Name_ResourceName_Resou~", - table: "AbpResourcePermissionGrants", - columns: new[] { "TenantId", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey" }, - unique: true); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 932f6bea1..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,1099 +0,0 @@ -// -using System; -using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(BackendAdminMigrationsDbContext))] - partial class BackendAdminMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("PropertyInfoId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("PropertyInfoId", "Name"); - - b.ToTable("AbpAuthEntityEnums", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("JavaScriptType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("JavaScriptType"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.Property("TypeInfoId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TypeInfoId", "TypeFullName"); - - b.ToTable("AbpAuthEntityProperties", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAuditEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("TypeFullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("TypeFullName"); - - b.HasKey("Id"); - - b.HasIndex("TypeFullName"); - - b.ToTable("AbpAuthEntitites", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("OrgCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("OrgCode"); - - b.Property("OrgId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthOrganizationUnitEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AccessedProperties") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("AccessedProperties"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("EntityTypeFullName") - .HasColumnType("longtext"); - - b.Property("EntityTypeId") - .HasColumnType("char(36)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FilterGroup") - .HasColumnType("longtext") - .HasColumnName("FilterGroup"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Operation") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityTypeId"); - - b.ToTable("AbpAuthRoleEntityRules", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.SubjectStrategy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Strategy") - .HasColumnType("int"); - - b.Property("SubjectId") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("SubjectId"); - - b.Property("SubjectName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("SubjectName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpAuthSubjectStrategys", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.ToTable("AbpEditions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("DisableTime") - .HasColumnType("datetime(6)"); - - b.Property("EditionId") - .HasColumnType("char(36)"); - - b.Property("EnableTime") - .HasColumnType("datetime(6)"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NormalizedName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("EditionId"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Content") - .HasMaxLength(1048576) - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Culture") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Culture"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("DisplayName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .HasDatabaseName("IX_Tenant_Text_Template_Name"); - - b.ToTable("AbpTextTemplates", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("DefaultCultureName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("DefaultCultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsInlineLocalized") - .HasColumnType("tinyint(1)"); - - b.Property("IsLayout") - .HasColumnType("tinyint(1)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("Layout") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("Layout"); - - b.Property("LocalizationResourceName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("LocalizationResourceName"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Name"); - - b.Property("RenderEngine") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RenderEngine"); - - b.HasKey("Id"); - - b.ToTable("AbpTextTemplateDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowedProviders") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ValueType") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatures", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpFeatureGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpFeatureValues", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("ManagementPermissionName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ParentName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ResourceName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("StateCheckers") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("ResourceName", "Name") - .IsUnique(); - - b.ToTable("AbpPermissions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpPermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpPermissionGroups", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.ResourcePermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ResourceKey") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ResourceName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ResourceName", "ResourceKey", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpResourcePermissionGrants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("AbpSettings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityEnumInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", "PropertyInfo") - .WithMany("Enums") - .HasForeignKey("PropertyInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PropertyInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "TypeInfo") - .WithMany("Properties") - .HasForeignKey("TypeInfoId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.OrganizationUnitEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.RoleEntityRule", b => - { - b.HasOne("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", "EntityTypeInfo") - .WithMany() - .HasForeignKey("EntityTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EntityTypeInfo"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") - .WithMany() - .HasForeignKey("EditionId"); - - b.Navigation("Edition"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => - { - b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityPropertyInfo", b => - { - b.Navigation("Enums"); - }); - - modelBuilder.Entity("LINGYUN.Abp.DataProtectionManagement.EntityTypeInfo", b => - { - b.Navigation("Properties"); - }); - - modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => - { - b.Navigation("ConnectionStrings"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.EN.md deleted file mode 100644 index ae8a99c84..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,67 +0,0 @@ -# LY.MicroService.BackendAdmin.EntityFrameworkCore - -Backend Administration Database Migration Module, providing database migration functionality for the backend management system. - -[简体中文](./README.md) - -## Features - -* Integrated SaaS multi-tenancy data migration -* Integrated Setting Management data migration -* Integrated Data Protection Management data migration -* Integrated Permission Management data migration -* Integrated Feature Management data migration -* Integrated Text Templating data migration -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "BackendAdminDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure BackendAdminDbMigrator connection string in appsettings.json - -2. Add Module Dependency - ```csharp - [DependsOn(typeof(BackendAdminMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## Database Tables Description - -* Saas Related Tables - Tenant, edition and other multi-tenancy related data -* AbpSettings - System settings data -* AbpDataProtection - Data protection related data -* AbpPermissionGrants - Permission authorization data -* AbpFeatures - Feature data -* AbpTextTemplates - Text template data - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ASP.NET Core Data Protection](https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/introduction) diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.md deleted file mode 100644 index bca4f966b..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# LY.MicroService.BackendAdmin.EntityFrameworkCore - -后台管理数据迁移模块,提供后台管理系统相关的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成SaaS多租户数据迁移 -* 集成设置管理数据迁移 -* 集成数据保护管理数据迁移 -* 集成权限管理数据迁移 -* 集成特性管理数据迁移 -* 集成文本模板数据迁移 -* 支持MySQL数据库 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "BackendAdminDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置BackendAdminDbMigrator连接字符串 - -2. 添加模块依赖 - ```csharp - [DependsOn(typeof(BackendAdminMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## 数据库表说明 - -* Saas相关表 - 租户、版本等多租户相关数据 -* AbpSettings - 系统设置数据 -* AbpDataProtection - 数据保护相关数据 -* AbpPermissionGrants - 权限授权数据 -* AbpFeatures - 功能特性数据 -* AbpTextTemplates - 文本模板数据 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ASP.NET Core数据保护](https://docs.microsoft.com/zh-cn/aspnet/core/security/data-protection/introduction) diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/RolePermissionDataSeedContributor.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/RolePermissionDataSeedContributor.cs deleted file mode 100644 index eeee0f0db..000000000 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/RolePermissionDataSeedContributor.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Data; -using Volo.Abp.MultiTenancy; -using Volo.Abp.PermissionManagement; - -namespace LY.MicroService.BackendAdmin.EntityFrameworkCore; - -public class RolePermissionDataSeedContributor : IDataSeedContributor -{ - public ILogger Logger { protected get; set; } - - protected ICurrentTenant CurrentTenant { get; } - protected IPermissionDataSeeder PermissionDataSeeder { get; } - protected IPermissionDefinitionManager PermissionDefinitionManager { get; } - - public RolePermissionDataSeedContributor( - ICurrentTenant currentTenant, - IPermissionDataSeeder permissionDataSeeder, - IPermissionDefinitionManager permissionDefinitionManager) - { - CurrentTenant = currentTenant; - PermissionDataSeeder = permissionDataSeeder; - PermissionDefinitionManager = permissionDefinitionManager; - - Logger = NullLogger.Instance; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - using (CurrentTenant.Change(context.TenantId)) - { - Logger.LogInformation("Seeding the new tenant admin role permissions..."); - - var definitionPermissions = await PermissionDefinitionManager.GetPermissionsAsync(); - await PermissionDataSeeder.SeedAsync( - RolePermissionValueProvider.ProviderName, - "admin", - definitionPermissions.Select(x => x.Name), - context.TenantId); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj deleted file mode 100644 index b74eb1836..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - Debug;Release - AnyCPU - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs deleted file mode 100644 index df03c3de7..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.LocalizationManagement.DbMigrator; - -public class LocalizationManagementDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public LocalizationManagementDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(LocalizationManagementDbMigratorHostedService).Assembly; - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs deleted file mode 100644 index d39b3a985..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.LocalizationManagement.DbMigrator; -public partial class LocalizationManagementDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs deleted file mode 100644 index c99ed3745..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.LocalizationManagement.DbMigrator; - -[DependsOn( - typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) - )] -public partial class LocalizationManagementDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs deleted file mode 100644 index 160347370..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.LocalizationManagement.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.LocalizationManagement.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.LocalizationManagement.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index 145ee8cb9..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.LocalizationManagement.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.EN.md deleted file mode 100644 index 0250062a1..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.EN.md +++ /dev/null @@ -1,68 +0,0 @@ -# LY.MicroService.LocalizationManagement.DbMigrator - -Localization Management Database Migration Console Application, used for executing database migrations and initializing seed data for the localization management system. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Inherit all migration features from localization management system -* Support multi-language resource management -* Support dynamic language text management -* Support language management - -## Module Dependencies - -```csharp -[DependsOn( - typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "LocalizationManagementDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure LocalizationManagementDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## Seed Data - -* Default language configurations -* Basic localization resources -* System text resources -* Default permission configurations - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ABP Localization Documentation](https://docs.abp.io/en/abp/latest/Localization) diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.md deleted file mode 100644 index a5589741d..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# LY.MicroService.LocalizationManagement.DbMigrator - -本地化管理数据库迁移控制台应用程序,用于执行本地化管理系统的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 继承本地化管理系统的所有迁移功能 -* 支持多语言资源管理 -* 支持动态语言文本管理 -* 支持语言管理 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "LocalizationManagementDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置LocalizationManagementDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 种子数据 - -* 默认语言配置 -* 基础本地化资源 -* 系统文本资源 -* 默认权限配置 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ABP本地化文档](https://docs.abp.io/zh-Hans/abp/latest/Localization) diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj deleted file mode 100644 index 81da03a1c..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.LocalizationManagement.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationEventHandler.cs deleted file mode 100644 index 06f3ac46b..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationEventHandler.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.Extensions.Logging; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; -public class LocalizationManagementDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase -{ - public LocalizationManagementDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs deleted file mode 100644 index a8fa4423b..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; - -public class LocalizationManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - public LocalizationManagementDbMigrationService( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs deleted file mode 100644 index 874880c0e..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; - -[ConnectionStringName("LocalizationManagementDbMigrator")] -public class LocalizationManagementMigrationsDbContext : AbpDbContext -{ - public LocalizationManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureLocalization(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs deleted file mode 100644 index ca647917b..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; - -public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public LocalizationManagementMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new LocalizationManagementMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.LocalizationManagement.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index 906dc56ad..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,40 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; - -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpDataDbMigratorModule) - )] -public class LocalizationManagementMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs deleted file mode 100644 index dfdf8fdc2..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs +++ /dev/null @@ -1,169 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20230109093938_Initial-Localization-Management")] - partial class InitialLocalizationManagement - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs deleted file mode 100644 index feca8b9bd..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialLocalizationManagement : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLocalizationLanguages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - CultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UiCultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FlagIcon = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationLanguages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLocalizationResources", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Enable = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationResources", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpLocalizationTexts", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CultureName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Key = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResourceName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLocalizationTexts", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationLanguages_CultureName", - table: "AbpLocalizationLanguages", - column: "CultureName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationResources_Name", - table: "AbpLocalizationResources", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLocalizationTexts_Key", - table: "AbpLocalizationTexts", - column: "Key"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpLocalizationLanguages"); - - migrationBuilder.DropTable( - name: "AbpLocalizationResources"); - - migrationBuilder.DropTable( - name: "AbpLocalizationTexts"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs deleted file mode 100644 index 3922e9ff1..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs +++ /dev/null @@ -1,174 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20230110091142_Add-Default-Culture-Name-With-Resource-Record")] - partial class AddDefaultCultureNameWithResourceRecord - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("FlagIcon") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("FlagIcon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DefaultCultureName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DefaultCultureName"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs deleted file mode 100644 index 500cf79b7..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class AddDefaultCultureNameWithResourceRecord : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "DefaultCultureName", - table: "AbpLocalizationResources", - type: "varchar(64)", - maxLength: 64, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "DefaultCultureName", - table: "AbpLocalizationResources"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs deleted file mode 100644 index c5a625cfa..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.Designer.cs +++ /dev/null @@ -1,179 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - [Migration("20240729101616_Upgrade-Abp-Framework-To-8-2-0")] - partial class UpgradeAbpFrameworkTo820 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TwoLetterISOLanguageName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("TwoLetterISOLanguageName"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DefaultCultureName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DefaultCultureName"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs deleted file mode 100644 index 3512dc511..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20240729101616_Upgrade-Abp-Framework-To-8-2-0.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo820 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "FlagIcon", - table: "AbpLocalizationLanguages", - newName: "TwoLetterISOLanguageName"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AbpLocalizationTexts", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "TwoLetterISOLanguageName", - table: "AbpLocalizationLanguages", - newName: "FlagIcon"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AbpLocalizationTexts", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index bf856c44d..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,176 +0,0 @@ -// -using System; -using LY.MicroService.LocalizationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(LocalizationManagementMigrationsDbContext))] - partial class LocalizationManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TwoLetterISOLanguageName") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("TwoLetterISOLanguageName"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("UiCultureName"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpLocalizationLanguages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Resource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DefaultCultureName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DefaultCultureName"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("DisplayName"); - - b.Property("Enable") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpLocalizationResources", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Text", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CultureName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)") - .HasColumnName("CultureName"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Key"); - - b.Property("ResourceName") - .HasColumnType("longtext"); - - b.Property("Value") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("Key"); - - b.ToTable("AbpLocalizationTexts", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.EN.md deleted file mode 100644 index 19fd5344b..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,64 +0,0 @@ -# LY.MicroService.LocalizationManagement.EntityFrameworkCore - -Localization Management Database Migration Module, providing database migration functionality for the localization management system. - -[简体中文](./README.md) - -## Features - -* Integrated SaaS multi-tenancy data migration -* Integrated Localization Management data migration -* Integrated Setting Management data migration -* Integrated Permission Management data migration -* Integrated Feature Management data migration -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "LocalizationManagementDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure LocalizationManagementDbMigrator connection string in appsettings.json - -2. Add Module Dependency - ```csharp - [DependsOn(typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## Database Tables Description - -* AbpLocalization - Localization resources and text data -* Saas Related Tables - Tenant, edition and other multi-tenancy related data -* AbpSettings - System settings data -* AbpPermissionGrants - Permission authorization data -* AbpFeatures - Feature data - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ABP Localization Documentation](https://docs.abp.io/en/abp/latest/Localization) diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.md deleted file mode 100644 index c506bdc1c..000000000 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# LY.MicroService.LocalizationManagement.EntityFrameworkCore - -本地化管理数据迁移模块,提供本地化管理系统相关的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成SaaS多租户数据迁移 -* 集成本地化管理数据迁移 -* 集成设置管理数据迁移 -* 集成权限管理数据迁移 -* 集成特性管理数据迁移 -* 支持MySQL数据库 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "LocalizationManagementDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置LocalizationManagementDbMigrator连接字符串 - -2. 添加模块依赖 - ```csharp - [DependsOn(typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## 数据库表说明 - -* AbpLocalization - 本地化资源和文本数据 -* Saas相关表 - 租户、版本等多租户相关数据 -* AbpSettings - 系统设置数据 -* AbpPermissionGrants - 权限授权数据 -* AbpFeatures - 功能特性数据 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ABP本地化文档](https://docs.abp.io/zh-Hans/abp/latest/Localization) diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj deleted file mode 100644 index 6e052a446..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - Debug;Release - AnyCPU - false - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - PreserveNewest - - - - diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs deleted file mode 100644 index fbb1c2bd7..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.Platform.DbMigrator; - -public class PlatformDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public PlatformDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(PlatformDbMigratorHostedService).Assembly; - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs deleted file mode 100644 index 1b41d61f9..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.Platform.DbMigrator; -public partial class PlatformDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs deleted file mode 100644 index 231e43db9..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using LY.MicroService.Platform.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.Platform.DbMigrator; - -[DependsOn( - typeof(PlatformMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) - )] -public partial class PlatformDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs deleted file mode 100644 index 56b15a785..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.Platform.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.Platform", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.Platform", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index f8be836d8..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.Platform.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj deleted file mode 100644 index 3118e67c9..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.Platform.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs deleted file mode 100644 index df085320c..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs +++ /dev/null @@ -1,772 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20230110015904_Initial-Platform")] - partial class InitialPlatform - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs deleted file mode 100644 index 1d8cd46af..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs +++ /dev/null @@ -1,399 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialPlatform : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformDatas", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Code = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformDatas", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformLayouts", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformLayouts", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Code = table.Column(type: "varchar(23)", maxLength: 23, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Component = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LayoutId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Redirect = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformPackages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Note = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Version = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ForceUpdate = table.Column(type: "tinyint(1)", nullable: false), - Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Level = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformPackages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformRoleMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - RoleName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Startup = table.Column(type: "tinyint(1)", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformRoleMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformUserFavoriteMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AliasName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Color = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Framework = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Path = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Icon = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformUserFavoriteMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformUserMenus", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MenuId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Startup = table.Column(type: "tinyint(1)", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformUserMenus", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformDataItems", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DefaultValue = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowBeNull = table.Column(type: "tinyint(1)", nullable: false, defaultValue: true), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - ValueType = table.Column(type: "int", nullable: false), - DataId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformDataItems", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformDataItems_AppPlatformDatas_DataId", - column: x => x.DataId, - principalTable: "AppPlatformDatas", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformPackageBlobs", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - PackageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Url = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: true), - Summary = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreatedAt = table.Column(type: "datetime(6)", nullable: false), - UpdatedAt = table.Column(type: "datetime(6)", nullable: true), - License = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Authors = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ContentType = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SHA256 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - DownloadCount = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformPackageBlobs", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformPackageBlobs_AppPlatformPackages_PackageId", - column: x => x.PackageId, - principalTable: "AppPlatformPackages", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDataItems_DataId", - table: "AppPlatformDataItems", - column: "DataId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDataItems_Name", - table: "AppPlatformDataItems", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformDatas_Name", - table: "AppPlatformDatas", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformPackageBlobs_PackageId_Name", - table: "AppPlatformPackageBlobs", - columns: new[] { "PackageId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformPackages_Name_Version", - table: "AppPlatformPackages", - columns: new[] { "Name", "Version" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformRoleMenus_RoleName_MenuId", - table: "AppPlatformRoleMenus", - columns: new[] { "RoleName", "MenuId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserFavoriteMenus_UserId_MenuId", - table: "AppPlatformUserFavoriteMenus", - columns: new[] { "UserId", "MenuId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformUserMenus_UserId_MenuId", - table: "AppPlatformUserMenus", - columns: new[] { "UserId", "MenuId" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformDataItems"); - - migrationBuilder.DropTable( - name: "AppPlatformLayouts"); - - migrationBuilder.DropTable( - name: "AppPlatformMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformPackageBlobs"); - - migrationBuilder.DropTable( - name: "AppPlatformRoleMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformUserFavoriteMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformUserMenus"); - - migrationBuilder.DropTable( - name: "AppPlatformDatas"); - - migrationBuilder.DropTable( - name: "AppPlatformPackages"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs deleted file mode 100644 index 3e59606c6..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.Designer.cs +++ /dev/null @@ -1,868 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20230506071509_Add-Portal-Login")] - partial class AddPortalLogin - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs deleted file mode 100644 index a9aeabdbb..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230506071509_Add-Portal-Login.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class AddPortalLogin : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformEnterprises", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - EnglishName = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Address = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LegalMan = table.Column(type: "varchar(60)", maxLength: 60, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - TaxCode = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - OrganizationCode = table.Column(type: "varchar(16)", maxLength: 16, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RegistrationCode = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RegistrationDate = table.Column(type: "datetime(6)", nullable: true), - ExpirationDate = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformEnterprises", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformEnterprises"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs deleted file mode 100644 index e4f7e6171..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.Designer.cs +++ /dev/null @@ -1,873 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20230509024453_Add-Logo-Property-With-Portal")] - partial class AddLogoPropertyWithPortal - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs deleted file mode 100644 index 3c19f9fbc..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230509024453_Add-Logo-Property-With-Portal.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class AddLogoPropertyWithPortal : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Logo", - table: "AppPlatformEnterprises", - type: "varchar(512)", - maxLength: 512, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Logo", - table: "AppPlatformEnterprises"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs deleted file mode 100644 index d074d2edb..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.Designer.cs +++ /dev/null @@ -1,885 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20231028084601_Upgrade-Abp-Framework-To-7.4.0")] - partial class UpgradeAbpFrameworkTo740 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs deleted file mode 100644 index d5b79c78d..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20231028084601_Upgrade-Abp-Framework-To-7.4.0.cs +++ /dev/null @@ -1,378 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo740 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AppPlatformPackages", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformPackages", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformPackages", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformPackages", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformMenus", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformMenus", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformMenus", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformMenus", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformLayouts", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformLayouts", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformLayouts", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformLayouts", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformEnterprises", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformEnterprises", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformEnterprises", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformEnterprises", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformDatas", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformDatas", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformDatas", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformDatas", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformDataItems", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformDataItems", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppPlatformDataItems", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformDataItems", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformPackages", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformPackages", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformMenus", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformMenus", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformLayouts", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformLayouts", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformEnterprises", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformEnterprises", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformDatas", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformDatas", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppPlatformDataItems", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppPlatformDataItems", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs deleted file mode 100644 index 2fe946571..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.Designer.cs +++ /dev/null @@ -1,882 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20240729101742_Upgrade-Abp-Framework-To-8-2-0")] - partial class UpgradeAbpFrameworkTo820 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs deleted file mode 100644 index c412c8f66..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20240729101742_Upgrade-Abp-Framework-To-8-2-0.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo820 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "TenantId", - table: "AppPlatformPackages"); - - migrationBuilder.DropColumn( - name: "TenantId", - table: "AppPlatformPackageBlobs"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppPlatformPackageBlobs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TenantId", - table: "AppPlatformPackages", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppPlatformPackageBlobs", - type: "int", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddColumn( - name: "TenantId", - table: "AppPlatformPackageBlobs", - type: "char(36)", - nullable: true, - collation: "ascii_general_ci"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs deleted file mode 100644 index 2c54ed3cb..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.Designer.cs +++ /dev/null @@ -1,1070 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20241114072749_Add-Feedback")] - partial class AddFeedback - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Category"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformFeedbacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Capacity") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Capacity"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackComments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Attachments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Comments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Navigation("Attachments"); - - b.Navigation("Comments"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs deleted file mode 100644 index 650774174..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20241114072749_Add-Feedback.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class AddFeedback : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformFeedbacks", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Content = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Category = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformFeedbacks", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformFeedbackAttachments", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Url = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: false), - FeedbackId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformFeedbackAttachments", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformFeedbackAttachments_AppPlatformFeedbacks_Feedback~", - column: x => x.FeedbackId, - principalTable: "AppPlatformFeedbacks", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformFeedbackComments", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Capacity = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FeedbackId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformFeedbackComments", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformFeedbackComments_AppPlatformFeedbacks_FeedbackId", - column: x => x.FeedbackId, - principalTable: "AppPlatformFeedbacks", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformFeedbackAttachments_FeedbackId", - table: "AppPlatformFeedbackAttachments", - column: "FeedbackId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformFeedbackComments_FeedbackId", - table: "AppPlatformFeedbackComments", - column: "FeedbackId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformFeedbackAttachments"); - - migrationBuilder.DropTable( - name: "AppPlatformFeedbackComments"); - - migrationBuilder.DropTable( - name: "AppPlatformFeedbacks"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs deleted file mode 100644 index 32b6b2c87..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.Designer.cs +++ /dev/null @@ -1,1342 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20250226010532_Add-Message-Center")] - partial class AddMessageCenter - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "9.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Category"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformFeedbacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Capacity") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Capacity"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackComments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("BodyTransferEncoding") - .HasColumnType("int"); - - b.Property("CC") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("CC"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeliveryNotificationOptions") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("From") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("From"); - - b.Property("IsBodyHtml") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Normalize") - .HasColumnType("tinyint(1)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Subject") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Subject"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEmailMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("BlobName"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Key"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageHeaders", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformSmsMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Attachments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Comments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Attachments") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Headers") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Navigation("Attachments"); - - b.Navigation("Comments"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Navigation("Attachments"); - - b.Navigation("Headers"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs deleted file mode 100644 index 85d39a520..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20250226010532_Add-Message-Center.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class AddMessageCenter : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppPlatformEmailMessages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - From = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Subject = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsBodyHtml = table.Column(type: "tinyint(1)", nullable: false), - CC = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Normalize = table.Column(type: "tinyint(1)", nullable: false), - Priority = table.Column(type: "int", nullable: true), - BodyTransferEncoding = table.Column(type: "int", nullable: true), - DeliveryNotificationOptions = table.Column(type: "int", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Sender = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Receiver = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SendTime = table.Column(type: "datetime(6)", nullable: true), - SendCount = table.Column(type: "int", nullable: false), - Status = table.Column(type: "int", nullable: false), - Reason = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformEmailMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformSmsMessages", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Sender = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Receiver = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SendTime = table.Column(type: "datetime(6)", nullable: true), - SendCount = table.Column(type: "int", nullable: false), - Status = table.Column(type: "int", nullable: false), - Reason = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformSmsMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformEmailMessageAttachments", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - MessageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - BlobName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformEmailMessageAttachments", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformEmailMessageAttachments_AppPlatformEmailMessages_~", - column: x => x.MessageId, - principalTable: "AppPlatformEmailMessages", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppPlatformEmailMessageHeaders", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - MessageId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Key = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppPlatformEmailMessageHeaders", x => x.Id); - table.ForeignKey( - name: "FK_AppPlatformEmailMessageHeaders_AppPlatformEmailMessages_Mess~", - column: x => x.MessageId, - principalTable: "AppPlatformEmailMessages", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformEmailMessageAttachments_MessageId", - table: "AppPlatformEmailMessageAttachments", - column: "MessageId"); - - migrationBuilder.CreateIndex( - name: "IX_AppPlatformEmailMessageHeaders_MessageId", - table: "AppPlatformEmailMessageHeaders", - column: "MessageId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppPlatformEmailMessageAttachments"); - - migrationBuilder.DropTable( - name: "AppPlatformEmailMessageHeaders"); - - migrationBuilder.DropTable( - name: "AppPlatformSmsMessages"); - - migrationBuilder.DropTable( - name: "AppPlatformEmailMessages"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs deleted file mode 100644 index e4cc7d104..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs +++ /dev/null @@ -1,1501 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - [Migration("20260424033808_Add-Blob-Management-Module")] - partial class AddBlobManagementModule - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("char(36)"); - - b.Property("ContentType") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("bigint"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("ParentId"); - - b.HasIndex("TenantId", "ContainerId", "FullName"); - - b.ToTable("AbpBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.BlobContainer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Category"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformFeedbacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Capacity") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Capacity"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackComments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("BodyTransferEncoding") - .HasColumnType("int"); - - b.Property("CC") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("CC"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeliveryNotificationOptions") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("From") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("From"); - - b.Property("IsBodyHtml") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Normalize") - .HasColumnType("tinyint(1)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Subject") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Subject"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEmailMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("BlobName"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Key"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageHeaders", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformSmsMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.HasOne("LINGYUN.Abp.BlobManagement.BlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("LINGYUN.Abp.BlobManagement.Blob", null) - .WithMany("Blobs") - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Attachments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Comments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Attachments") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Headers") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.Navigation("Blobs"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Navigation("Attachments"); - - b.Navigation("Comments"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Navigation("Attachments"); - - b.Navigation("Headers"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs deleted file mode 100644 index ea11353c7..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - /// - public partial class AddBlobManagementModule : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpBlobContainers", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpBlobs", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - ContainerId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false), - ContentType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Size = table.Column(type: "bigint", nullable: false), - ExpirationTime = table.Column(type: "datetime(6)", nullable: true), - Provider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FullName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DownloadCount = table.Column(type: "bigint", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBlobs", x => x.Id); - table.ForeignKey( - name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", - column: x => x.ContainerId, - principalTable: "AbpBlobContainers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpBlobs_AbpBlobs_ParentId", - column: x => x.ParentId, - principalTable: "AbpBlobs", - principalColumn: "Id"); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobContainers_TenantId_Name", - table: "AbpBlobContainers", - columns: new[] { "TenantId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_ContainerId", - table: "AbpBlobs", - column: "ContainerId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_ParentId", - table: "AbpBlobs", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_TenantId_ContainerId_FullName", - table: "AbpBlobs", - columns: new[] { "TenantId", "ContainerId", "FullName" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpBlobs"); - - migrationBuilder.DropTable( - name: "AbpBlobContainers"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 82193982f..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,1498 +0,0 @@ -// -using System; -using LY.MicroService.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(PlatformMigrationsDbContext))] - partial class PlatformMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("char(36)"); - - b.Property("ContentType") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("bigint"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("ParentId"); - - b.HasIndex("TenantId", "ContainerId", "FullName"); - - b.ToTable("AbpBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.BlobContainer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDatas", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowBeNull") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(true); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DefaultValue"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Description"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Name"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("DataId"); - - b.HasIndex("Name"); - - b.ToTable("AppPlatformDataItems", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Category") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Category"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformFeedbacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Capacity") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Capacity"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("FeedbackId") - .HasColumnType("char(36)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackId"); - - b.ToTable("AppPlatformFeedbackComments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DataId") - .HasColumnType("char(36)"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformLayouts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(23) - .HasColumnType("varchar(23)") - .HasColumnName("Code"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Component"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsPublic") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LayoutId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("ParentId") - .HasColumnType("char(36)"); - - b.Property("Path") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("Redirect") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Redirect"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("RoleName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("RoleName"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleName", "MenuId"); - - b.ToTable("AppPlatformRoleMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AliasName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("AliasName"); - - b.Property("Color") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Color"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("DisplayName"); - - b.Property("Framework") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Framework"); - - b.Property("Icon") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Icon"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Name"); - - b.Property("Path") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Path"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserFavoriteMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MenuId") - .HasColumnType("char(36)"); - - b.Property("Startup") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "MenuId"); - - b.ToTable("AppPlatformUserMenus", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("BodyTransferEncoding") - .HasColumnType("int"); - - b.Property("CC") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("CC"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeliveryNotificationOptions") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("From") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("From"); - - b.Property("IsBodyHtml") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Normalize") - .HasColumnType("tinyint(1)"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Subject") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Subject"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEmailMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("BlobName"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Name"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageAttachments", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Key") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)") - .HasColumnName("Key"); - - b.Property("MessageId") - .HasColumnType("char(36)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Value"); - - b.HasKey("Id"); - - b.HasIndex("MessageId"); - - b.ToTable("AppPlatformEmailMessageHeaders", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("Content"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Provider") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Provider"); - - b.Property("Reason") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Reason"); - - b.Property("Receiver") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Receiver"); - - b.Property("SendCount") - .HasColumnType("int"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("Sender") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("Sender"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformSmsMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("ForceUpdate") - .HasColumnType("tinyint(1)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Level") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("Note") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Note"); - - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("Version"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Version"); - - b.ToTable("AppPlatformPackages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Authors") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Authors"); - - b.Property("ContentType") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("ContentType"); - - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DownloadCount") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("License") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("License"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("PackageId") - .HasColumnType("char(36)"); - - b.Property("SHA256") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("SHA256"); - - b.Property("Size") - .HasColumnType("bigint"); - - b.Property("Summary") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)") - .HasColumnName("Summary"); - - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); - - b.Property("Url") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Url"); - - b.HasKey("Id"); - - b.HasIndex("PackageId", "Name"); - - b.ToTable("AppPlatformPackageBlobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Address") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("char(36)") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("EnglishName") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("EnglishName"); - - b.Property("ExpirationDate") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LegalMan") - .HasMaxLength(60) - .HasColumnType("varchar(60)") - .HasColumnName("LegalMan"); - - b.Property("Logo") - .HasMaxLength(512) - .HasColumnType("varchar(512)") - .HasColumnName("Logo"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Name"); - - b.Property("OrganizationCode") - .HasMaxLength(16) - .HasColumnType("varchar(16)") - .HasColumnName("OrganizationCode"); - - b.Property("RegistrationCode") - .HasMaxLength(30) - .HasColumnType("varchar(30)") - .HasColumnName("RegistrationCode"); - - b.Property("RegistrationDate") - .HasColumnType("datetime(6)"); - - b.Property("TaxCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("TaxCode"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.ToTable("AppPlatformEnterprises", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.HasOne("LINGYUN.Abp.BlobManagement.BlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("LINGYUN.Abp.BlobManagement.Blob", null) - .WithMany("Blobs") - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => - { - b.HasOne("LINGYUN.Platform.Datas.Data", null) - .WithMany("Items") - .HasForeignKey("DataId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Attachments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b => - { - b.HasOne("LINGYUN.Platform.Feedbacks.Feedback", null) - .WithMany("Comments") - .HasForeignKey("FeedbackId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Attachments") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b => - { - b.HasOne("LINGYUN.Platform.Messages.EmailMessage", null) - .WithMany("Headers") - .HasForeignKey("MessageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b => - { - b.HasOne("LINGYUN.Platform.Packages.Package", "Package") - .WithMany("Blobs") - .HasForeignKey("PackageId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Package"); - }); - - modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b => - { - b.Navigation("Blobs"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b => - { - b.Navigation("Attachments"); - - b.Navigation("Comments"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b => - { - b.Navigation("Attachments"); - - b.Navigation("Headers"); - }); - - modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b => - { - b.Navigation("Blobs"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationEventHandler.cs deleted file mode 100644 index 79e3ffa52..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationEventHandler.cs +++ /dev/null @@ -1,91 +0,0 @@ -using LINGYUN.Abp.Saas.Tenants; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using System; -using System.Data.Common; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.Platform.EntityFrameworkCore; -public class PlatformDbMigrationEventHandler : - EfCoreDatabaseMigrationEventHandlerBase, - IDistributedEventHandler -{ - protected PlatformServiceDataSeeder DataSeeder { get; } - protected IConfiguration Configuration { get; } - public PlatformDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory, - PlatformServiceDataSeeder dataSeeder, - IConfiguration configuration) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - Configuration = configuration; - } - - protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) - { - using (CurrentTenant.Change(eventData.Id)) - { - using (var uow = UnitOfWorkManager.Begin(requiresNew: true)) - { - var seedContext = new DataSeedContext(eventData.Id); - foreach (var prop in eventData.Properties) - { - seedContext.WithProperty(prop.Key, prop.Value); - } - - await DataSeeder.SeedAsync(seedContext); - - await uow.CompleteAsync(); - } - } - } - - public async virtual Task HandleEventAsync(TenantDeletedEto eventData) - { - var hostDefaultConnectionString = Configuration.GetConnectionString(ConnectionStrings.DefaultConnectionStringName); - using (CurrentTenant.Change(eventData.Id)) - { - // 需要回收策略为回收且存在默认连接字符串且默认连接字符串与宿主不同 - if (eventData.Strategy == RecycleStrategy.Recycle && !eventData.DefaultConnectionString.IsNullOrWhiteSpace()) - { - var hostConnection = new DbConnectionStringBuilder() - { - ConnectionString = hostDefaultConnectionString, - }; - var tenantConnection = new DbConnectionStringBuilder() - { - ConnectionString = eventData.DefaultConnectionString, - }; - if (hostConnection.EquivalentTo(tenantConnection)) - { - return; - } - - using var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true); - var buildr = new DbContextOptionsBuilder(); - buildr.UseMySql(eventData.DefaultConnectionString, ServerVersion.AutoDetect(eventData.DefaultConnectionString)); - await using var dbConnection = new DbContext(buildr.Options); - if ((await dbConnection.Database.GetAppliedMigrationsAsync()).Any()) - { - await dbConnection.Database.EnsureDeletedAsync(); - } - } - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs deleted file mode 100644 index f54ecaa88..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.Platform.EntityFrameworkCore; - -public class PlatformDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - protected PlatformServiceDataSeeder DataSeeder { get; } - - public PlatformDbMigrationService( - PlatformServiceDataSeeder dataSeeder, - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task SeedAsync() - { - // DbMigrator迁移数据种子 - await DataSeeder.SeedAsync(new DataSeedContext()); - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs deleted file mode 100644 index 2d6ffe20e..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs +++ /dev/null @@ -1,25 +0,0 @@ -using LINGYUN.Abp.BlobManagement.EntityFrameworkCore; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.Platform.EntityFrameworkCore; - -[ConnectionStringName("PlatformDbMigrator")] -public class PlatformMigrationsDbContext : AbpDbContext -{ - public PlatformMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigurePlatform(); - modelBuilder.ConfigureBlobManagement(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs deleted file mode 100644 index af07c60cf..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.Platform.EntityFrameworkCore; - -public class PlatformMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public PlatformMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new PlatformMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Platform.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index c9d97e1c1..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,44 +0,0 @@ -using LINGYUN.Abp.BlobManagement.EntityFrameworkCore; -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.UI.Navigation.VueVbenAdmin5; -using LINGYUN.Platform.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.Platform.EntityFrameworkCore; - -[DependsOn( - typeof(AbpUINavigationVueVbenAdmin5Module), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(PlatformEntityFrameworkCoreModule), - typeof(AbpBlobManagementEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpDataDbMigratorModule) - )] -public class PlatformMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformServiceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformServiceDataSeeder.cs deleted file mode 100644 index d7cfd625a..000000000 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformServiceDataSeeder.cs +++ /dev/null @@ -1,43 +0,0 @@ -using LINGYUN.Abp.BlobManagement; -using LINGYUN.Abp.UI.Navigation; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; - -namespace LY.MicroService.Platform.EntityFrameworkCore; - -public class PlatformServiceDataSeeder : ITransientDependency -{ - protected NavigationDataSeeder NavigationDataSeeder { get; } - protected IBlobDataSeeder BlobDataSeeder { get; } - protected ICurrentTenant CurrentTenant { get; } - public PlatformServiceDataSeeder( - NavigationDataSeeder navigationDataSeeder, - ICurrentTenant currentTenant, - IBlobDataSeeder blobDataSeeder) - { - NavigationDataSeeder = navigationDataSeeder; - CurrentTenant = currentTenant; - BlobDataSeeder = blobDataSeeder; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - using (CurrentTenant.Change(context.TenantId)) - { - await SeedNavigationAsync(); - await SeedBlobContainerAsync(); - } - } - - private async Task SeedNavigationAsync() - { - await NavigationDataSeeder.SeedAsync(CurrentTenant.Id); - } - - private async Task SeedBlobContainerAsync() - { - await BlobDataSeeder.SeedAsync(CurrentTenant.Id); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj deleted file mode 100644 index b8d2fcc8d..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - Debug;Release - AnyCPU - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs deleted file mode 100644 index bff87b3a7..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.RealtimeMessage.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.RealtimeMessage.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.RealtimeMessage.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index e1dc32b0b..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.RealtimeMessage.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.EN.md deleted file mode 100644 index 4d437bd50..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.EN.md +++ /dev/null @@ -1,69 +0,0 @@ -# LY.MicroService.RealtimeMessage.DbMigrator - -Real-time Message Database Migration Console Application, used for executing database migrations and initializing seed data for the real-time message system. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Inherit all migration features from real-time message system -* Support SignalR message management -* Support message group management -* Support message subscription management -* Support message history - -## Module Dependencies - -```csharp -[DependsOn( - typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "RealtimeMessageDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure RealtimeMessageDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## Seed Data - -* Default message group configurations -* Basic message subscription configurations -* System message templates -* Default permission configurations - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [SignalR Documentation](https://docs.microsoft.com/aspnet/core/signalr/introduction) diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.md deleted file mode 100644 index 36a2b00e0..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# LY.MicroService.RealtimeMessage.DbMigrator - -实时消息数据库迁移控制台应用程序,用于执行实时消息系统的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 继承实时消息系统的所有迁移功能 -* 支持SignalR消息管理 -* 支持消息分组管理 -* 支持消息订阅管理 -* 支持消息历史记录 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "RealtimeMessageDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置RealtimeMessageDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 种子数据 - -* 默认消息组配置 -* 基础消息订阅配置 -* 系统消息模板 -* 默认权限配置 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [SignalR文档](https://docs.microsoft.com/aspnet/core/signalr/introduction) diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs deleted file mode 100644 index 7d2766e2e..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.RealtimeMessage.DbMigrator; - -public class RealtimeMessageDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public RealtimeMessageDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(RealtimeMessageDbMigratorHostedService).Assembly; - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs deleted file mode 100644 index d10abc4b4..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.RealtimeMessage.DbMigrator; -public partial class RealtimeMessageDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs deleted file mode 100644 index 02816d783..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs +++ /dev/null @@ -1,15 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.RealtimeMessage.DbMigrator; - -[DependsOn( - typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule), - typeof(AbpAutofacModule) - )] -public partial class RealtimeMessageDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs deleted file mode 100644 index 4be1c0958..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/DataSeeds/NotificationDataSeeder.cs +++ /dev/null @@ -1,139 +0,0 @@ -using LINGYUN.Abp.Notifications; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Users; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.DataSeeds; - -public class NotificationDataSeeder : ITransientDependency -{ - public ILogger Logger { protected get; set; } - protected INotificationSender NotificationSender { get; } - protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } - public NotificationDataSeeder( - INotificationSender notificationSender, - INotificationSubscriptionManager notificationSubscriptionManager) - { - NotificationSender = notificationSender; - NotificationSubscriptionManager = notificationSubscriptionManager; - - Logger = NullLogger.Instance; - } - - public virtual async Task SeedAsync(DataSeedContext context) - { - await SubscribeDefaultNotifierAsync(context); - await SeedWelcomeNotifierAsync(context); - } - - public async virtual Task SubscribeDefaultNotifierAsync(DataSeedContext context) - { - if (!context.Properties.TryGetValue(RealtimeMessageDataSeedConsts.AdminUserIdPropertyName, out var userIdString) || - !Guid.TryParse(userIdString?.ToString(), out var adminUserId)) - { - return; - } - var adminUserName = context.Properties.GetOrDefault(RealtimeMessageDataSeedConsts.AdminUserNamePropertyName)?.ToString() - ?? RealtimeMessageDataSeedConsts.AdminUserNameDefaultValue; - var userIdentifer = new UserIdentifier(adminUserId, adminUserName); - // 订阅内置通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.SystemNotice); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.OnsideNotice); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - DefaultNotifications.ActivityNotice); - - // 新用户订阅会话过期通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - "AbpIdentity.Session.Expiration"); - // 新用户订阅不活跃用户相关通知 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - "AbpIdentity.IdentityUser.InactiveUserReminderNotifier"); - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - "AbpIdentity.IdentityUser.InactiveUserDeactivationNotifier"); - - // 订阅用户欢迎消息 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - userIdentifer, - UserNotificationNames.WelcomeToApplication); - } - - public async virtual Task SeedWelcomeNotifierAsync(DataSeedContext context) - { - try - { - if (!context.TenantId.HasValue) - { - return; - } - if (!context.Properties.TryGetValue(RealtimeMessageDataSeedConsts.AdminUserIdPropertyName, out var userIdString) || - !Guid.TryParse(userIdString?.ToString(), out var adminUserId)) - { - return; - } - var adminEmailAddress = context.Properties.GetOrDefault(RealtimeMessageDataSeedConsts.AdminEmailPropertyName)?.ToString() - ?? RealtimeMessageDataSeedConsts.AdminEmailDefaultValue; - var adminUserName = context.Properties.GetOrDefault(RealtimeMessageDataSeedConsts.AdminUserNamePropertyName)?.ToString() - ?? RealtimeMessageDataSeedConsts.AdminUserNameDefaultValue; - - var tenantAdminUserIdentifier = new UserIdentifier(adminUserId, adminEmailAddress); - - // 租户管理员订阅事件 - await NotificationSubscriptionManager - .SubscribeAsync( - context.TenantId, - tenantAdminUserIdentifier, - TenantNotificationNames.NewTenantRegistered); - - Logger.LogInformation("publish new tenant notification.."); - await NotificationSender.SendNofiterAsync( - TenantNotificationNames.NewTenantRegistered, - new NotificationTemplate( - TenantNotificationNames.NewTenantRegistered, - formUser: adminEmailAddress, - data: new Dictionary - { - { "name", adminUserName }, - { "email", adminEmailAddress }, - { "id", context.TenantId }, - }), - tenantAdminUserIdentifier, - context.TenantId, - NotificationSeverity.Success); - - Logger.LogInformation("tenant administrator subscribes to new tenant events.."); - } - catch (Exception ex) - { - Logger.LogWarning(ex, "Failed to send the tenant initialization notification."); - } - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj deleted file mode 100644 index e4bc4ba04..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.RealtimeMessage.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs deleted file mode 100644 index ee9314811..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs +++ /dev/null @@ -1,720 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20230110063428_Initial-Realtime-Message")] - partial class InitialRealtimeMessage - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.1") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs deleted file mode 100644 index 28f70f553..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs +++ /dev/null @@ -1,483 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialRealtimeMessage : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppChatGroups", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - AdminUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - Name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Tag = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Address = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Notice = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - MaxUserCount = table.Column(type: "int", nullable: false), - AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), - AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false), - Description = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AvatarUrl = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppChatGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppGroupChatBlacks", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - ShieldUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppGroupChatBlacks", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppGroupMessages", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - GroupId = table.Column(type: "bigint", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MessageId = table.Column(type: "bigint", nullable: false), - SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false), - Source = table.Column(type: "int", nullable: false), - State = table.Column(type: "tinyint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppGroupMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppNotificationDefinitionGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotificationDefinitionGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppNotificationDefinitions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - GroupName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationLifetime = table.Column(type: "int", nullable: false), - NotificationType = table.Column(type: "int", nullable: false), - ContentType = table.Column(type: "int", nullable: false, defaultValue: 0), - Providers = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotificationDefinitions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppNotifications", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Severity = table.Column(type: "tinyint", nullable: false), - Type = table.Column(type: "int", nullable: false), - ContentType = table.Column(type: "int", nullable: false, defaultValue: 0), - NotificationId = table.Column(type: "bigint", nullable: false), - NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationTypeName = table.Column(type: "varchar(512)", maxLength: 512, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExpirationTime = table.Column(type: "datetime(6)", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotifications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatCards", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Sex = table.Column(type: "int", nullable: false), - Sign = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - AvatarUrl = table.Column(type: "varchar(512)", maxLength: 512, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Birthday = table.Column(type: "datetime(6)", nullable: true), - Age = table.Column(type: "int", nullable: false), - LastOnlineTime = table.Column(type: "datetime(6)", nullable: true), - State = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatCards", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatFriends", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - FrientId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - Black = table.Column(type: "tinyint(1)", nullable: false), - DontDisturb = table.Column(type: "tinyint(1)", nullable: false), - SpecialFocus = table.Column(type: "tinyint(1)", nullable: false), - RemarkName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "tinyint unsigned", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatFriends", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatGroups", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupId = table.Column(type: "bigint", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserChatSettings", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - AllowAnonymous = table.Column(type: "tinyint(1)", nullable: false), - AllowAddFriend = table.Column(type: "tinyint(1)", nullable: false), - RequireAddFriendValition = table.Column(type: "tinyint(1)", nullable: false), - AllowReceiveMessage = table.Column(type: "tinyint(1)", nullable: false), - AllowSendMessage = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserGroupCards", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - NickName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsAdmin = table.Column(type: "tinyint(1)", nullable: false), - SilenceEnd = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserGroupCards", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserMessages", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ReceiveUserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - MessageId = table.Column(type: "bigint", nullable: false), - SendUserName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false), - Source = table.Column(type: "int", nullable: false), - State = table.Column(type: "tinyint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserMessages", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserNotifications", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - NotificationId = table.Column(type: "bigint", nullable: false), - ReadStatus = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserNotifications", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AppUserSubscribes", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - NotificationName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AppChatGroups_TenantId_Name", - table: "AppChatGroups", - columns: new[] { "TenantId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AppGroupChatBlacks_TenantId_GroupId", - table: "AppGroupChatBlacks", - columns: new[] { "TenantId", "GroupId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppGroupMessages_TenantId_GroupId", - table: "AppGroupMessages", - columns: new[] { "TenantId", "GroupId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppNotifications_TenantId_NotificationName", - table: "AppNotifications", - columns: new[] { "TenantId", "NotificationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatCards_TenantId_UserId", - table: "AppUserChatCards", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", - table: "AppUserChatFriends", - columns: new[] { "TenantId", "UserId", "FrientId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatGroups_TenantId_GroupId_UserId", - table: "AppUserChatGroups", - columns: new[] { "TenantId", "GroupId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserChatSettings_TenantId_UserId", - table: "AppUserChatSettings", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserGroupCards_TenantId_UserId", - table: "AppUserGroupCards", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AppUserMessages_TenantId_ReceiveUserId", - table: "AppUserMessages", - columns: new[] { "TenantId", "ReceiveUserId" }); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_User_Notification_Id", - table: "AppUserNotifications", - columns: new[] { "TenantId", "UserId", "NotificationId" }); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_User_Notification_Name", - table: "AppUserSubscribes", - columns: new[] { "TenantId", "UserId", "NotificationName" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppChatGroups"); - - migrationBuilder.DropTable( - name: "AppGroupChatBlacks"); - - migrationBuilder.DropTable( - name: "AppGroupMessages"); - - migrationBuilder.DropTable( - name: "AppNotificationDefinitionGroups"); - - migrationBuilder.DropTable( - name: "AppNotificationDefinitions"); - - migrationBuilder.DropTable( - name: "AppNotifications"); - - migrationBuilder.DropTable( - name: "AppUserChatCards"); - - migrationBuilder.DropTable( - name: "AppUserChatFriends"); - - migrationBuilder.DropTable( - name: "AppUserChatGroups"); - - migrationBuilder.DropTable( - name: "AppUserChatSettings"); - - migrationBuilder.DropTable( - name: "AppUserGroupCards"); - - migrationBuilder.DropTable( - name: "AppUserMessages"); - - migrationBuilder.DropTable( - name: "AppUserNotifications"); - - migrationBuilder.DropTable( - name: "AppUserSubscribes"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs deleted file mode 100644 index a2474b0c3..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.Designer.cs +++ /dev/null @@ -1,734 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20231028084700_Upgrade-Abp-Framework-To-7.4.0")] - partial class UpgradeAbpFrameworkTo740 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Template") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs deleted file mode 100644 index fb7177466..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20231028084700_Upgrade-Abp-Framework-To-7.4.0.cs +++ /dev/null @@ -1,330 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo740 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AppUserMessages", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserMessages", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserMessages", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserMessages", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserGroupCards", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserGroupCards", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserGroupCards", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserGroupCards", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserChatFriends", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserChatFriends", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserChatFriends", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserChatFriends", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserChatCards", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserChatCards", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppUserChatCards", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserChatCards", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Template", - table: "AppNotificationDefinitions", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppGroupMessages", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppGroupMessages", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AppGroupMessages", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppGroupMessages", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Template", - table: "AppNotificationDefinitions"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserMessages", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserMessages", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserGroupCards", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserGroupCards", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserChatFriends", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserChatFriends", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppUserChatCards", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppUserChatCards", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "AppGroupMessages", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "AppGroupMessages", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs deleted file mode 100644 index f3c29d65c..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.Designer.cs +++ /dev/null @@ -1,734 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20240218002928_Modify-Notification-Name-Length")] - partial class ModifyNotificationNameLength - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Template") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs deleted file mode 100644 index 6ff4f7700..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240218002928_Modify-Notification-Name-Length.cs +++ /dev/null @@ -1,138 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - /// - public partial class ModifyNotificationNameLength : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "NotificationName", - table: "AppUserSubscribes", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(100)", - oldMaxLength: 100) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "NotificationName", - table: "AppNotifications", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(100)", - oldMaxLength: 100) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AppNotificationDefinitions", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(64)", - oldMaxLength: 64) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "GroupName", - table: "AppNotificationDefinitions", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(64)", - oldMaxLength: 64) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AppNotificationDefinitionGroups", - type: "varchar(255)", - maxLength: 255, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(64)", - oldMaxLength: 64) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "NotificationName", - table: "AppUserSubscribes", - type: "varchar(100)", - maxLength: 100, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "NotificationName", - table: "AppNotifications", - type: "varchar(100)", - maxLength: 100, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AppNotificationDefinitions", - type: "varchar(64)", - maxLength: 64, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "GroupName", - table: "AppNotificationDefinitions", - type: "varchar(64)", - maxLength: 64, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "Name", - table: "AppNotificationDefinitionGroups", - type: "varchar(64)", - maxLength: 64, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)", - oldMaxLength: 255) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs deleted file mode 100644 index 5f968d4cd..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.Designer.cs +++ /dev/null @@ -1,761 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20240729101817_Upgrade-Abp-Framework-To-8-2-0")] - partial class UpgradeAbpFrameworkTo820 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Template") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs deleted file mode 100644 index aab4feb07..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20240729101817_Upgrade-Abp-Framework-To-8-2-0.cs +++ /dev/null @@ -1,235 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo820 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserSubscribes", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserNotifications", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserMessages", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserGroupCards", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatSettings", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatGroups", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatFriends", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatCards", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppNotifications", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppGroupMessages", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppGroupChatBlacks", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppChatGroups", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserSubscribes", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserNotifications", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserMessages", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserGroupCards", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatSettings", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatGroups", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatFriends", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppUserChatCards", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppNotifications", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppGroupMessages", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppGroupChatBlacks", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AlterColumn( - name: "Id", - table: "AppChatGroups", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs deleted file mode 100644 index bbbdece35..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.Designer.cs +++ /dev/null @@ -1,814 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - [Migration("20260420065252_Upgrade-Abp-Framework-To-10-0-2")] - partial class UpgradeAbpFrameworkTo1002 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Template") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Reason") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName") - .HasDatabaseName("IX_Tenant_Send_Notification_Name"); - - b.ToTable("AppNotificationSendRecords", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs deleted file mode 100644 index acb8bf8b7..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20260420065252_Upgrade-Abp-Framework-To-10-0-2.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo1002 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AppNotificationSendRecords", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Provider = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SendTime = table.Column(type: "datetime(6)", nullable: false), - UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - UserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") - .Annotation("MySql:CharSet", "utf8mb4"), - NotificationId = table.Column(type: "bigint", nullable: false), - NotificationName = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - State = table.Column(type: "int", nullable: false), - Reason = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AppNotificationSendRecords", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_Tenant_Send_Notification_Name", - table: "AppNotificationSendRecords", - columns: new[] { "TenantId", "NotificationName" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AppNotificationSendRecords"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 52c372d3a..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,811 +0,0 @@ -// -using System; -using LY.MicroService.RealtimeMessage.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(RealtimeMessageMigrationsDbContext))] - partial class RealtimeMessageMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Age") - .HasColumnType("int"); - - b.Property("AvatarUrl") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Birthday") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastOnlineTime") - .HasColumnType("datetime(6)"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("Sex") - .HasColumnType("int"); - - b.Property("Sign") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Black") - .HasColumnType("tinyint(1)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("DontDisturb") - .HasColumnType("tinyint(1)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FrientId") - .HasColumnType("char(36)"); - - b.Property("IsStatic") - .HasColumnType("tinyint(1)"); - - b.Property("RemarkName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SpecialFocus") - .HasColumnType("tinyint(1)"); - - b.Property("Status") - .HasColumnType("tinyint unsigned"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "FrientId"); - - b.ToTable("AppUserChatFriends", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AllowAddFriend") - .HasColumnType("tinyint(1)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowReceiveMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("RequireAddFriendValition") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserChatSettings", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ReceiveUserId"); - - b.ToTable("AppUserMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.ChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("AdminUserId") - .HasColumnType("char(36)"); - - b.Property("AllowAnonymous") - .HasColumnType("tinyint(1)"); - - b.Property("AllowSendMessage") - .HasColumnType("tinyint(1)"); - - b.Property("AvatarUrl") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("MaxUserCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); - - b.Property("Notice") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Tag") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AppChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupChatBlack", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("ShieldUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupChatBlacks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.GroupMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("longtext"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("MessageId") - .HasColumnType("bigint"); - - b.Property("SendUserName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId"); - - b.ToTable("AppGroupMessages", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserChatGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("GroupId") - .HasColumnType("bigint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "GroupId", "UserId"); - - b.ToTable("AppUserChatGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.MessageService.Groups.UserGroupCard", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("NickName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("SilenceEnd") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AppUserGroupCards", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExpirationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationTypeName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("Severity") - .HasColumnType("tinyint"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName"); - - b.ToTable("AppNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionGroupRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitionGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("AllowSubscriptionToClients") - .HasColumnType("tinyint(1)"); - - b.Property("ContentType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("DisplayName") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("NotificationLifetime") - .HasColumnType("int"); - - b.Property("NotificationType") - .HasColumnType("int"); - - b.Property("Providers") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); - - b.Property("Template") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AppNotificationDefinitions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.NotificationSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("Reason") - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("SendTime") - .HasColumnType("datetime(6)"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "NotificationName") - .HasDatabaseName("IX_Tenant_Send_Notification_Name"); - - b.ToTable("AppNotificationSendRecords", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserNotification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("NotificationId") - .HasColumnType("bigint"); - - b.Property("ReadStatus") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationId") - .HasDatabaseName("IX_Tenant_User_Notification_Id"); - - b.ToTable("AppUserNotifications", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.Notifications.UserSubscribe", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("NotificationName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.Property("UserName") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasDefaultValue("/"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "UserId", "NotificationName") - .IsUnique() - .HasDatabaseName("IX_Tenant_User_Notification_Name"); - - b.ToTable("AppUserSubscribes", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.EN.md deleted file mode 100644 index 8942ab5dd..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,71 +0,0 @@ -# LY.MicroService.RealtimeMessage.EntityFrameworkCore - -Real-time Message Database Migration Module, providing database migration functionality for real-time messaging and notification systems. - -[简体中文](./README.md) - -## Features - -* Integrated SaaS multi-tenancy data migration -* Integrated Notification System data migration -* Integrated Message Service data migration -* Integrated Text Templating data migration -* Integrated Setting Management data migration -* Integrated Permission Management data migration -* Integrated Feature Management data migration -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpMessageServiceEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "RealtimeMessageDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure RealtimeMessageDbMigrator connection string in appsettings.json - -2. Add Module Dependency - ```csharp - [DependsOn(typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## Database Tables Description - -* AbpNotifications - Notification system data tables -* AbpNotificationsDefinition - Notification definition data tables -* AbpMessageService - Message service data tables -* Saas Related Tables - Tenant, edition and other multi-tenancy related data -* AbpSettings - System settings data -* AbpPermissionGrants - Permission authorization data -* AbpFeatures - Feature data -* AbpTextTemplates - Text template data - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ABP Notification System Documentation](https://docs.abp.io/en/abp/latest/Notification-System) diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.md deleted file mode 100644 index 3cc1243c8..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# LY.MicroService.RealtimeMessage.EntityFrameworkCore - -实时消息数据迁移模块,提供实时消息和通知系统相关的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成SaaS多租户数据迁移 -* 集成通知系统数据迁移 -* 集成消息服务数据迁移 -* 集成文本模板数据迁移 -* 集成设置管理数据迁移 -* 集成权限管理数据迁移 -* 集成特性管理数据迁移 -* 支持MySQL数据库 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpMessageServiceEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "RealtimeMessageDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置RealtimeMessageDbMigrator连接字符串 - -2. 添加模块依赖 - ```csharp - [DependsOn(typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## 数据库表说明 - -* AbpNotifications - 通知系统数据表 -* AbpNotificationsDefinition - 通知定义数据表 -* AbpMessageService - 消息服务数据表 -* Saas相关表 - 租户、版本等多租户相关数据 -* AbpSettings - 系统设置数据 -* AbpPermissionGrants - 权限授权数据 -* AbpFeatures - 功能特性数据 -* AbpTextTemplates - 文本模板数据 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ABP通知系统文档](https://docs.abp.io/zh-Hans/abp/latest/Notification-System) diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeedConsts.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeedConsts.cs deleted file mode 100644 index 76860e115..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeedConsts.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -public class RealtimeMessageDataSeedConsts -{ - public const string AdminUserIdPropertyName = "AdminUserId"; - public const string AdminEmailPropertyName = "AdminEmail"; - public const string AdminEmailDefaultValue = "admin@abp.io"; - public const string AdminUserNamePropertyName = "AdminUserName"; - public const string AdminUserNameDefaultValue = "admin"; -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeeder.cs deleted file mode 100644 index 896c3640a..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDataSeeder.cs +++ /dev/null @@ -1,33 +0,0 @@ -using LY.MicroService.RealtimeMessage.EntityFrameworkCore.DataSeeds; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -public class RealtimeMessageDataSeeder : ITransientDependency -{ - protected NotificationDataSeeder NotificationDataSeeder { get; } - protected ICurrentTenant CurrentTenant { get; } - public RealtimeMessageDataSeeder( - ICurrentTenant currentTenant, - NotificationDataSeeder notificationDataSeeder) - { - CurrentTenant = currentTenant; - NotificationDataSeeder = notificationDataSeeder; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - using (CurrentTenant.Change(context.TenantId)) - { - await SeedNotificationAsync(context); - } - } - - private async Task SeedNotificationAsync(DataSeedContext context) - { - await NotificationDataSeeder.SeedAsync(context); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationEventHandler.cs deleted file mode 100644 index b155cc7a5..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationEventHandler.cs +++ /dev/null @@ -1,88 +0,0 @@ -using LINGYUN.Abp.Notifications; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -public class RealtimeMessageDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase -{ - protected INotificationSender NotificationSender { get; } - protected INotificationSubscriptionManager NotificationSubscriptionManager { get; } - - public RealtimeMessageDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory, - INotificationSender notificationSender, - INotificationSubscriptionManager notificationSubscriptionManager) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - NotificationSender = notificationSender; - NotificationSubscriptionManager = notificationSubscriptionManager; - } - - protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) - { - using (CurrentTenant.Change(eventData.Id)) - { - await SendNotificationAsync(eventData); - } - } - - protected async virtual Task SendNotificationAsync(TenantCreatedEto eventData) - { - try - { - if (!eventData.Properties.TryGetValue("AdminUserId", out var userIdString) || - !Guid.TryParse(userIdString, out var adminUserId)) - { - return; - } - var adminEmailAddress = eventData.Properties.GetOrDefault("AdminEmail") ?? "admin@abp.io"; - - var tenantAdminUserIdentifier = new UserIdentifier(adminUserId, adminEmailAddress); - - // 租户管理员订阅事件 - await NotificationSubscriptionManager - .SubscribeAsync( - eventData.Id, - tenantAdminUserIdentifier, - TenantNotificationNames.NewTenantRegistered); - - Logger.LogInformation("publish new tenant notification.."); - await NotificationSender.SendNofiterAsync( - TenantNotificationNames.NewTenantRegistered, - new NotificationTemplate( - TenantNotificationNames.NewTenantRegistered, - formUser: adminEmailAddress, - data: new Dictionary - { - { "name", eventData.Name }, - { "email", adminEmailAddress }, - { "id", eventData.Id }, - }), - tenantAdminUserIdentifier, - eventData.Id, - NotificationSeverity.Success); - - Logger.LogInformation("tenant administrator subscribes to new tenant events.."); - } - catch (Exception ex) - { - Logger.LogWarning(ex, "Failed to send the tenant initialization notification."); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs deleted file mode 100644 index 4bbf9a0eb..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -public class RealtimeMessageDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - protected RealtimeMessageDataSeeder DataSeeder { get; } - - public RealtimeMessageDbMigrationService( - RealtimeMessageDataSeeder dataSeeder, - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - protected async override Task SeedAsync() - { - // DbMigrator迁移数据种子 - await DataSeeder.SeedAsync(new DataSeedContext()); - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs deleted file mode 100644 index b83e0d687..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs +++ /dev/null @@ -1,26 +0,0 @@ -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using LINGYUN.Abp.Notifications.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -[ConnectionStringName("RealtimeMessageDbMigrator")] -public class RealtimeMessageMigrationsDbContext : AbpDbContext -{ - public RealtimeMessageMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureNotifications(); - modelBuilder.ConfigureNotificationsDefinition(); - modelBuilder.ConfigureMessageService(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs deleted file mode 100644 index 57d6857a4..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public RealtimeMessageMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new RealtimeMessageMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.RealtimeMessage.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index eac9c90b6..000000000 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,44 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.MessageService.EntityFrameworkCore; -using LINGYUN.Abp.Notifications.EntityFrameworkCore; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; - -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpMessageServiceEntityFrameworkCoreModule), - typeof(AbpTextTemplatingEntityFrameworkCoreModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpDataDbMigratorModule) - )] -public class RealtimeMessageMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj deleted file mode 100644 index 569cc0f57..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs deleted file mode 100644 index 874475846..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.TaskManagement.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.TaskManagement.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.TaskManagement.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index 3000e4aba..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.TaskManagement.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.EN.md deleted file mode 100644 index 2fa132c9d..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.EN.md +++ /dev/null @@ -1,65 +0,0 @@ -# LY.MicroService.TaskManagement.DbMigrator - -Task Management Database Migration Console Application, used for executing database migrations and initializing seed data for the task management system. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Inherit all migration features from task management system - -## Module Dependencies - -```csharp -[DependsOn( - typeof(TaskManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "TaskManagementDbMigrator": "Your database connection string" - }, - "IdentityServer": { - "Clients": { - "TaskManagement_App": { - "ClientId": "TaskManagement_App" - } - } - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure TaskManagementDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.md deleted file mode 100644 index 022349040..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# LY.MicroService.TaskManagement.DbMigrator - -任务管理数据库迁移控制台应用程序,用于执行任务管理系统的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 继承任务管理系统的所有迁移功能 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(TaskManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "TaskManagementDbMigrator": "你的数据库连接字符串" - }, - "IdentityServer": { - "Clients": { - "TaskManagement_App": { - "ClientId": "TaskManagement_App" - } - } - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置TaskManagementDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs deleted file mode 100644 index a28df7c77..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs +++ /dev/null @@ -1,51 +0,0 @@ -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.TaskManagement.DbMigrator; - -public class TaskManagementDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public TaskManagementDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs deleted file mode 100644 index 2d6de0c50..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.TaskManagement.DbMigrator; -public partial class TaskManagementDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs deleted file mode 100644 index 0cd2fe685..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.TaskManagement.DbMigrator; - -[DependsOn( - typeof(TaskManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) - )] -public partial class TaskManagementDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj deleted file mode 100644 index 1b1ba6ab7..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - net10.0 - LY.MicroService.TaskManagement.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs deleted file mode 100644 index 5f5155e85..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs +++ /dev/null @@ -1,273 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20230112021621_Initial-Task-Management")] - partial class InitialTaskManagement - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs deleted file mode 100644 index 8d6b2915f..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialTaskManagement : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "TK_BackgroundJobActions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - JobId = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - Paramters = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_TK_BackgroundJobActions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "TK_BackgroundJobLogs", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - JobId = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobGroup = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - JobType = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Message = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - RunTime = table.Column(type: "datetime(6)", nullable: false), - Exception = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_TK_BackgroundJobLogs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "TK_BackgroundJobs", - columns: table => new - { - Id = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Group = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Result = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Args = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Status = table.Column(type: "int", nullable: false), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - LockTimeOut = table.Column(type: "int", nullable: false), - BeginTime = table.Column(type: "datetime(6)", nullable: false), - EndTime = table.Column(type: "datetime(6)", nullable: true), - LastRunTime = table.Column(type: "datetime(6)", nullable: true), - NextRunTime = table.Column(type: "datetime(6)", nullable: true), - JobType = table.Column(type: "int", nullable: false), - Cron = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Source = table.Column(type: "int", nullable: false), - Priority = table.Column(type: "int", nullable: false), - TriggerCount = table.Column(type: "int", nullable: false), - TryCount = table.Column(type: "int", nullable: false), - MaxTryCount = table.Column(type: "int", nullable: false), - MaxCount = table.Column(type: "int", nullable: false), - Interval = table.Column(type: "int", nullable: false), - IsAbandoned = table.Column(type: "tinyint(1)", nullable: false), - NodeName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_TK_BackgroundJobs", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobActions_Name", - table: "TK_BackgroundJobActions", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobLogs_JobGroup_JobName", - table: "TK_BackgroundJobLogs", - columns: new[] { "JobGroup", "JobName" }); - - migrationBuilder.CreateIndex( - name: "IX_TK_BackgroundJobs_Name_Group", - table: "TK_BackgroundJobs", - columns: new[] { "Name", "Group" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "TK_BackgroundJobActions"); - - migrationBuilder.DropTable( - name: "TK_BackgroundJobLogs"); - - migrationBuilder.DropTable( - name: "TK_BackgroundJobs"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs deleted file mode 100644 index 21ad67044..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.Designer.cs +++ /dev/null @@ -1,273 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20230330025320_Modify-Job-Group-Length")] - partial class ModifyJobGroupLength - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs deleted file mode 100644 index 3f90321c5..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230330025320_Modify-Job-Group-Length.cs +++ /dev/null @@ -1,68 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class ModifyJobGroupLength : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Group", - table: "TK_BackgroundJobs", - type: "varchar(100)", - maxLength: 100, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(50)", - oldMaxLength: 50) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "JobGroup", - table: "TK_BackgroundJobLogs", - type: "varchar(100)", - maxLength: 100, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(50)", - oldMaxLength: 50, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Group", - table: "TK_BackgroundJobs", - type: "varchar(50)", - maxLength: 50, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(100)", - oldMaxLength: 100) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "JobGroup", - table: "TK_BackgroundJobLogs", - type: "varchar(50)", - maxLength: 50, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(100)", - oldMaxLength: 100, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs deleted file mode 100644 index bf71e516c..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.Designer.cs +++ /dev/null @@ -1,277 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20231028084851_Upgrade-Abp-Framework-To-7.4.0")] - partial class UpgradeAbpFrameworkTo740 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs deleted file mode 100644 index 66e4b7075..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20231028084851_Upgrade-Abp-Framework-To-7.4.0.cs +++ /dev/null @@ -1,138 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo740 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "TK_BackgroundJobs", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "TK_BackgroundJobs", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "TK_BackgroundJobs", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "TK_BackgroundJobs", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "TK_BackgroundJobActions", - keyColumn: "ExtraProperties", - keyValue: null, - column: "ExtraProperties", - value: ""); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "TK_BackgroundJobActions", - type: "longtext", - nullable: false, - oldClrType: typeof(string), - oldType: "longtext", - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "TK_BackgroundJobActions", - keyColumn: "ConcurrencyStamp", - keyValue: null, - column: "ConcurrencyStamp", - value: ""); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "TK_BackgroundJobActions", - type: "varchar(40)", - maxLength: 40, - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40, - oldNullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "TK_BackgroundJobs", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "TK_BackgroundJobs", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ExtraProperties", - table: "TK_BackgroundJobActions", - type: "longtext", - nullable: true, - oldClrType: typeof(string), - oldType: "longtext") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AlterColumn( - name: "ConcurrencyStamp", - table: "TK_BackgroundJobActions", - type: "varchar(40)", - maxLength: 40, - nullable: true, - oldClrType: typeof(string), - oldType: "varchar(40)", - oldMaxLength: 40) - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:CharSet", "utf8mb4"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs deleted file mode 100644 index ab63c4785..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.Designer.cs +++ /dev/null @@ -1,282 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - [Migration("20260420073543_Upgrade-Abp-Framework-To-10-0-2")] - partial class UpgradeAbpFrameworkTo1002 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs deleted file mode 100644 index e34b40fc2..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20260420073543_Upgrade-Abp-Framework-To-10-0-2.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class UpgradeAbpFrameworkTo1002 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "TK_BackgroundJobLogs", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "Id", - table: "TK_BackgroundJobLogs", - type: "bigint", - nullable: false, - oldClrType: typeof(long), - oldType: "bigint") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 17c251396..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,279 +0,0 @@ -// -using System; -using LY.MicroService.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(TaskManagementMigrationsDbContext))] - partial class TaskManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "10.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobId") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("Paramters") - .HasColumnType("longtext") - .HasColumnName("Paramters"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("TK_BackgroundJobActions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => - { - b.Property("Id") - .HasColumnType("varchar(255)"); - - b.Property("Args") - .HasColumnType("longtext") - .HasColumnName("Args"); - - b.Property("BeginTime") - .HasColumnType("datetime(6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Cron") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("Cron"); - - b.Property("Description") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("Description"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Group"); - - b.Property("Interval") - .HasColumnType("int"); - - b.Property("IsAbandoned") - .HasColumnType("tinyint(1)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("JobType") - .HasColumnType("int"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("char(36)") - .HasColumnName("LastModifierId"); - - b.Property("LastRunTime") - .HasColumnType("datetime(6)"); - - b.Property("LockTimeOut") - .HasColumnType("int"); - - b.Property("MaxCount") - .HasColumnType("int"); - - b.Property("MaxTryCount") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("Name"); - - b.Property("NextRunTime") - .HasColumnType("datetime(6)"); - - b.Property("NodeName") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("NodeName"); - - b.Property("Priority") - .HasColumnType("int"); - - b.Property("Result") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Result"); - - b.Property("Source") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("TriggerCount") - .HasColumnType("int"); - - b.Property("TryCount") - .HasColumnType("int"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Type"); - - b.HasKey("Id"); - - b.HasIndex("Name", "Group"); - - b.ToTable("TK_BackgroundJobs", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("Exception") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)") - .HasColumnName("Exception"); - - b.Property("JobGroup") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobGroup"); - - b.Property("JobId") - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("JobId"); - - b.Property("JobName") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("JobName"); - - b.Property("JobType") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("JobType"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)") - .HasColumnName("Message"); - - b.Property("RunTime") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("JobGroup", "JobName"); - - b.ToTable("TK_BackgroundJobLogs", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.EN.md deleted file mode 100644 index 204c9aa0f..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,68 +0,0 @@ -# LY.MicroService.TaskManagement.EntityFrameworkCore - -Task Management Database Migration Module, providing database migration functionality for the task management system. - -[简体中文](./README.md) - -## Features - -* Integrated SaaS multi-tenancy data migration -* Integrated Task Management data migration -* Integrated Setting Management data migration -* Integrated Permission Management data migration -* Integrated Feature Management data migration -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(TaskManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "TaskManagementDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure TaskManagementDbMigrator connection string in appsettings.json - -2. Add Module Dependency - ```csharp - [DependsOn(typeof(TaskManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## Database Tables Description - -* AbpTasks - Task basic information table -* AbpTaskCategories - Task categories table -* AbpTaskStatuses - Task statuses table -* AbpTaskAssignments - Task assignments table -* Saas Related Tables - Tenant, edition and other multi-tenancy related data -* AbpSettings - System settings data -* AbpPermissionGrants - Permission authorization data -* AbpFeatures - Feature data - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ABP Task Management Module](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/task-management) diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.md deleted file mode 100644 index b98067158..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# LY.MicroService.TaskManagement.EntityFrameworkCore - -任务管理数据迁移模块,提供任务管理系统相关的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成SaaS多租户数据迁移 -* 集成任务管理数据迁移 -* 集成设置管理数据迁移 -* 集成权限管理数据迁移 -* 集成特性管理数据迁移 -* 支持MySQL数据库 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(TaskManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "TaskManagementDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置TaskManagementDbMigrator连接字符串 - -2. 添加模块依赖 - ```csharp - [DependsOn(typeof(TaskManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## 数据库表说明 - -* AbpTasks - 任务基本信息表 -* AbpTaskCategories - 任务分类表 -* AbpTaskStatuses - 任务状态表 -* AbpTaskAssignments - 任务分配表 -* Saas相关表 - 租户、版本等多租户相关数据 -* AbpSettings - 系统设置数据 -* AbpPermissionGrants - 权限授权数据 -* AbpFeatures - 功能特性数据 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ABP任务管理模块](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/task-management) diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationEventHandler.cs deleted file mode 100644 index 09366ef7f..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationEventHandler.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LINGYUN.Abp.Saas.Tenants; -using Microsoft.Extensions.Logging; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.Domain.Entities.Events.Distributed; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -public class TaskManagementDbMigrationEventHandler : - EfCoreDatabaseMigrationEventHandlerBase, - IDistributedEventHandler> -{ - protected TaskServiceDataSeeder DataSeeder { get; } - - public TaskManagementDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory, - TaskServiceDataSeeder dataSeeder) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - DataSeeder = dataSeeder; - } - - public async Task HandleEventAsync(EntityDeletedEto eventData) - { - // 租户删除时移除轮询作业 - await DataSeeder.RemoveSeedAsync(eventData.Entity.Id); - } - - protected async override Task AfterTenantCreated(TenantCreatedEto eventData, bool schemaMigrated) - { - // 新租户数据种子 - var context = new DataSeedContext(eventData.Id); - if (eventData.Properties != null) - { - foreach (var property in eventData.Properties) - { - context.WithProperty(property.Key, property.Value); - } - } - - await DataSeeder.SeedAsync(context); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs deleted file mode 100644 index 02e804c9b..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -public class TaskManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - public TaskManagementDbMigrationService( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs deleted file mode 100644 index 55fad2229..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -[ConnectionStringName("TaskManagementDbMigrator")] -public class TaskManagementMigrationsDbContext : AbpDbContext -{ - public TaskManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureTaskManagement(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs deleted file mode 100644 index 22a5204fd..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public TaskManagementMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new TaskManagementMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.TaskManagement.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index 3f6cce80f..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,42 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.Quartz.MySqlInstaller; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -[DependsOn( - typeof(AbpQuartzMySqlInstallerModule), - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(TaskManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) - )] -public class TaskManagementMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskServiceDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskServiceDataSeeder.cs deleted file mode 100644 index d41324f3d..000000000 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskServiceDataSeeder.cs +++ /dev/null @@ -1,140 +0,0 @@ -using LINGYUN.Abp.BackgroundTasks; -using LINGYUN.Abp.BackgroundTasks.Internal; -using Microsoft.Extensions.Options; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.MultiTenancy; - -namespace LY.MicroService.TaskManagement.EntityFrameworkCore; - -public class TaskServiceDataSeeder : ITransientDependency -{ - protected AbpBackgroundTasksOptions Options { get; } - protected IJobStore JobStore { get; } - protected IJobScheduler JobScheduler { get; } - protected ICurrentTenant CurrentTenant { get; } - - public TaskServiceDataSeeder( - IOptions options, - IJobStore jobStore, - IJobScheduler jobScheduler, - ICurrentTenant currentTenant) - { - Options = options.Value; - JobStore = jobStore; - JobScheduler = jobScheduler; - CurrentTenant = currentTenant; - } - - public async virtual Task SeedAsync(DataSeedContext context) - { - if (context.TenantId.HasValue) - { - using (CurrentTenant.Change(context.TenantId)) - { - await QueueBackgroundJobAsync(context.TenantId.Value); - } - } - } - - public async virtual Task RemoveSeedAsync(Guid tenantId) - { - using (CurrentTenant.Change(tenantId)) - { - var pollingJob = BuildPollingJobInfo(tenantId); - await JobScheduler.RemoveAsync(pollingJob); - await JobStore.RemoveAsync(pollingJob.Id); - - var cleaningJob = BuildCleaningJobInfo(tenantId); - await JobScheduler.RemoveAsync(cleaningJob); - await JobStore.RemoveAsync(cleaningJob.Id); - - var checkingJob = BuildCheckingJobInfo(tenantId); - await JobScheduler.RemoveAsync(checkingJob); - await JobStore.RemoveAsync(checkingJob.Id); - } - } - - protected async virtual Task QueueBackgroundJobAsync(Guid tenantId) - { - var pollingJob = BuildPollingJobInfo(tenantId); - await JobStore.StoreAsync(pollingJob); - await JobScheduler.QueueAsync(pollingJob); - - var cleaningJob = BuildCleaningJobInfo(tenantId); - await JobStore.StoreAsync(cleaningJob); - await JobScheduler.QueueAsync(cleaningJob); - - var checkingJob = BuildCheckingJobInfo(tenantId); - await JobStore.StoreAsync(checkingJob); - await JobScheduler.QueueAsync(checkingJob); - } - - protected virtual JobInfo BuildPollingJobInfo(Guid tenantId) - { - return new JobInfo - { - Id = tenantId.ToString() + "_Polling", - Name = nameof(BackgroundPollingJob), - Group = "Polling", - Description = "Polling tasks to be executed", - Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, - Status = JobStatus.Running, - BeginTime = DateTime.Now, - CreationTime = DateTime.Now, - Cron = Options.JobFetchCronExpression, - JobType = JobType.Period, - Priority = JobPriority.High, - Source = JobSource.System, - LockTimeOut = Options.JobFetchLockTimeOut, - TenantId = tenantId, - Type = typeof(BackgroundPollingJob).AssemblyQualifiedName!, - }; - } - - protected virtual JobInfo BuildCleaningJobInfo(Guid tenantId) - { - return new JobInfo - { - Id = tenantId.ToString() + "_Cleaning", - Name = nameof(BackgroundCleaningJob), - Group = "Cleaning", - Description = "Cleaning tasks to be executed", - Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, - Status = JobStatus.Running, - BeginTime = DateTime.Now, - CreationTime = DateTime.Now, - Cron = Options.JobCleanCronExpression, - JobType = JobType.Period, - Priority = JobPriority.High, - Source = JobSource.System, - TenantId = tenantId, - Type = typeof(BackgroundCleaningJob).AssemblyQualifiedName!, - }; - } - - protected virtual JobInfo BuildCheckingJobInfo(Guid tenantId) - { - return new JobInfo - { - Id = tenantId.ToString() + "_Checking", - Name = nameof(BackgroundCheckingJob), - Group = "Checking", - Description = "Checking tasks to be executed", - Args = new Dictionary() { { nameof(JobInfo.TenantId), tenantId } }, - Status = JobStatus.Running, - BeginTime = DateTime.Now, - CreationTime = DateTime.Now, - Cron = Options.JobCheckCronExpression, - LockTimeOut = Options.JobCheckLockTimeOut, - JobType = JobType.Period, - Priority = JobPriority.High, - Source = JobSource.System, - TenantId = tenantId, - Type = typeof(BackgroundCheckingJob).AssemblyQualifiedName!, - }; - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj deleted file mode 100644 index 09719641b..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Exe - net10.0 - enable - enable - false - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Program.cs deleted file mode 100644 index e2aa2d438..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; -using Serilog.Events; - -namespace LY.MicroService.WebhooksManagement.DbMigrator; - -public class Program -{ - public async static Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) -#if DEBUG - .MinimumLevel.Override("LY.MicroService.WebhooksManagement.DbMigrator", LogEventLevel.Debug) -#else - .MinimumLevel.Override("LY.MicroService.WebhooksManagement.DbMigrator", LogEventLevel.Information) -#endif - .Enrich.FromLogContext() - .WriteTo.Console() - .WriteTo.File("Logs/migrations.txt") - .CreateLogger(); - - await CreateHostBuilder(args).RunConsoleAsync(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) - { - return Host.CreateDefaultBuilder(args) - .AddAppSettingsSecretsJson() - .ConfigureLogging((context, logging) => logging.ClearProviders()) - .ConfigureServices((hostContext, services) => - { - services.AddHostedService(); - }); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Properties/launchSettings.json b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Properties/launchSettings.json deleted file mode 100644 index 815771745..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "LY.MicroService.WebhooksManagement.DbMigrator": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.EN.md b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.EN.md deleted file mode 100644 index 7c7afceec..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.EN.md +++ /dev/null @@ -1,65 +0,0 @@ -# LY.MicroService.WebhooksManagement.DbMigrator - -Webhooks Management Database Migration Console Application, used for executing database migrations and initializing seed data for the webhooks management system. - -[简体中文](./README.md) - -## Features - -* Automatic database migration execution -* Initialize necessary system seed data -* Support command line parameter configuration -* Integrated Autofac dependency injection container -* Inherit all migration features from webhooks management system - -## Module Dependencies - -```csharp -[DependsOn( - typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "WebhooksManagementDbMigrator": "Your database connection string" - }, - "IdentityServer": { - "Clients": { - "WebhooksManagement_App": { - "ClientId": "WebhooksManagement_App" - } - } - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure WebhooksManagementDbMigrator connection string in appsettings.json - -2. Run Migration Program - ```bash - dotnet run - ``` - -## Command Line Arguments - -* --database-provider - * Specify database provider (default: MySQL) -* --connection-string - * Specify database connection string -* --skip-db-migrations - * Skip database migrations -* --skip-seed-data - * Skip seed data initialization - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [EF Core Migrations Documentation](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.md b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.md deleted file mode 100644 index 9b739fc14..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# LY.MicroService.WebhooksManagement.DbMigrator - -Webhooks管理数据库迁移控制台应用程序,用于执行Webhooks管理系统的数据库迁移和初始化种子数据。 - -[English](./README.EN.md) - -## 功能特性 - -* 自动执行数据库迁移 -* 初始化系统必要的种子数据 -* 支持命令行参数配置 -* 集成Autofac依赖注入容器 -* 继承Webhooks管理系统的所有迁移功能 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "WebhooksManagementDbMigrator": "你的数据库连接字符串" - }, - "IdentityServer": { - "Clients": { - "WebhooksManagement_App": { - "ClientId": "WebhooksManagement_App" - } - } - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置WebhooksManagementDbMigrator连接字符串 - -2. 运行迁移程序 - ```bash - dotnet run - ``` - -## 命令行参数 - -* --database-provider - * 指定数据库提供程序 (默认: MySQL) -* --connection-string - * 指定数据库连接字符串 -* --skip-db-migrations - * 跳过数据库迁移 -* --skip-seed-data - * 跳过种子数据初始化 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [EF Core迁移文档](https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/) diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Usings.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Usings.cs deleted file mode 100644 index 8d1695408..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/Usings.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp; -using LINGYUN.Abp; diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs deleted file mode 100644 index 7c9ad7f5c..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs +++ /dev/null @@ -1,51 +0,0 @@ -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Volo.Abp; -using Volo.Abp.Data; - -namespace LY.MicroService.WebhooksManagement.DbMigrator; - -public class WebhooksManagementDbMigratorHostedService : IHostedService -{ - private readonly IHostApplicationLifetime _hostApplicationLifetime; - private readonly IConfiguration _configuration; - - public WebhooksManagementDbMigratorHostedService( - IHostApplicationLifetime hostApplicationLifetime, - IConfiguration configuration) - { - _hostApplicationLifetime = hostApplicationLifetime; - _configuration = configuration; - } - - public async Task StartAsync(CancellationToken cancellationToken) - { - using var application = await AbpApplicationFactory - .CreateAsync(options => - { - options.Services.ReplaceConfiguration(_configuration); - options.UseAutofac(); - options.Services.AddLogging(c => c.AddSerilog()); - options.AddDataMigrationEnvironment(); - }); - await application.InitializeAsync(); - - await application - .ServiceProvider - .GetRequiredService() - .CheckAndApplyDatabaseMigrationsAsync(); - - await application.ShutdownAsync(); - - _hostApplicationLifetime.StopApplication(); - } - - public Task StopAsync(CancellationToken cancellationToken) - { - return Task.CompletedTask; - } -} - diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs deleted file mode 100644 index 4bd2127d0..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.Configure.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace LY.MicroService.WebhooksManagement.DbMigrator; -public partial class WebhooksManagementDbMigratorModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs deleted file mode 100644 index 4a51ee059..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Volo.Abp.Autofac; -using Volo.Abp.Modularity; - -namespace LY.MicroService.WebhooksManagement.DbMigrator; - -[DependsOn( - typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule), - typeof(AbpAutofacModule) - )] -public partial class WebhooksManagementDbMigratorModule : AbpModule -{ -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json deleted file mode 100644 index 3a9b9034b..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 11da52550..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj deleted file mode 100644 index 78ec226f7..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - false - net10.0 - LY.MicroService.WebhooksManagement.EntityFrameworkCore - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs deleted file mode 100644 index aea1aa56a..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.Designer.cs +++ /dev/null @@ -1,250 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20230112004517_Initial-Webhooks-Management")] - partial class InitialWebhooksManagement - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("RequiredFeatures") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhooks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhookGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs deleted file mode 100644 index 2728e9494..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230112004517_Initial-Webhooks-Management.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class InitialWebhooksManagement : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksEvents", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - WebhookName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Data = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - DeletionTime = table.Column(type: "datetime(6)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksEvents", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksSubscriptions", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - WebhookUri = table.Column(type: "varchar(255)", maxLength: 255, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Secret = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - Webhooks = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Headers = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksSubscriptions", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksWebhookGroups", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksWebhookGroups", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksWebhooks", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - RequiredFeatures = table.Column(type: "varchar(256)", maxLength: 256, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ExtraProperties = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksWebhooks", x => x.Id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "AbpWebhooksSendAttempts", - columns: table => new - { - Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), - WebhookEventId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - WebhookSubscriptionId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), - Response = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResponseStatusCode = table.Column(type: "int", nullable: true), - RequestHeaders = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ResponseHeaders = table.Column(type: "longtext", maxLength: 2147483647, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - SendExactSameData = table.Column(type: "tinyint(1)", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpWebhooksSendAttempts", x => x.Id); - table.ForeignKey( - name: "FK_AbpWebhooksSendAttempts_AbpWebhooksEvents_WebhookEventId", - column: x => x.WebhookEventId, - principalTable: "AbpWebhooksEvents", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "IX_AbpWebhooksSendAttempts_WebhookEventId", - table: "AbpWebhooksSendAttempts", - column: "WebhookEventId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpWebhooksWebhookGroups_Name", - table: "AbpWebhooksWebhookGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpWebhooksWebhooks_GroupName", - table: "AbpWebhooksWebhooks", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpWebhooksWebhooks_Name", - table: "AbpWebhooksWebhooks", - column: "Name", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpWebhooksSendAttempts"); - - migrationBuilder.DropTable( - name: "AbpWebhooksSubscriptions"); - - migrationBuilder.DropTable( - name: "AbpWebhooksWebhookGroups"); - - migrationBuilder.DropTable( - name: "AbpWebhooksWebhooks"); - - migrationBuilder.DropTable( - name: "AbpWebhooksEvents"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs deleted file mode 100644 index 1685303f1..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.Designer.cs +++ /dev/null @@ -1,261 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20230324095512_Add-Description-To-Subscription")] - partial class AddDescriptionToSubscription - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.2") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("RequiredFeatures") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhooks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhookGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Description"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs deleted file mode 100644 index 1b790d346..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20230324095512_Add-Description-To-Subscription.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class AddDescriptionToSubscription : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ConcurrencyStamp", - table: "AbpWebhooksSubscriptions", - type: "varchar(40)", - maxLength: 40, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Description", - table: "AbpWebhooksSubscriptions", - type: "varchar(128)", - maxLength: 128, - nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ConcurrencyStamp", - table: "AbpWebhooksSubscriptions"); - - migrationBuilder.DropColumn( - name: "Description", - table: "AbpWebhooksSubscriptions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs deleted file mode 100644 index 9df3d07a1..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.Designer.cs +++ /dev/null @@ -1,264 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - [Migration("20240605074803_Add-Timeout-Duration-To-Subscription")] - partial class AddTimeoutDurationToSubscription - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("RequiredFeatures") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhooks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhookGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Description"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("TimeoutDuration") - .HasColumnType("int"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs deleted file mode 100644 index 5cd98fcb8..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/20240605074803_Add-Timeout-Duration-To-Subscription.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - /// - public partial class AddTimeoutDurationToSubscription : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "TimeoutDuration", - table: "AbpWebhooksSubscriptions", - type: "int", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "TimeoutDuration", - table: "AbpWebhooksSubscriptions"); - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs deleted file mode 100644 index 717213fff..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs +++ /dev/null @@ -1,261 +0,0 @@ -// -using System; -using LY.MicroService.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; - -#nullable disable - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore.Migrations -{ - [DbContext(typeof(WebhooksManagementMigrationsDbContext))] - partial class WebhooksManagementMigrationsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("GroupName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("RequiredFeatures") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("GroupName"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhooks", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Data") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Data"); - - b.Property("DeletionTime") - .HasColumnType("datetime(6)") - .HasColumnName("DeletionTime"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("WebhookName"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksEvents", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookGroupDefinitionRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpWebhooksWebhookGroups", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("LastModificationTime") - .HasColumnType("datetime(6)") - .HasColumnName("LastModificationTime"); - - b.Property("RequestHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("RequestHeaders"); - - b.Property("Response") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Response"); - - b.Property("ResponseHeaders") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("ResponseHeaders"); - - b.Property("ResponseStatusCode") - .HasColumnType("int"); - - b.Property("SendExactSameData") - .HasColumnType("tinyint(1)"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("WebhookEventId") - .HasColumnType("char(36)"); - - b.Property("WebhookSubscriptionId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("WebhookEventId"); - - b.ToTable("AbpWebhooksSendAttempts", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("char(36)") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Description"); - - b.Property("Headers") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Headers"); - - b.Property("IsActive") - .HasColumnType("tinyint(1)"); - - b.Property("Secret") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasColumnName("Secret"); - - b.Property("TenantId") - .HasColumnType("char(36)"); - - b.Property("TimeoutDuration") - .HasColumnType("int"); - - b.Property("WebhookUri") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)") - .HasColumnName("WebhookUri"); - - b.Property("Webhooks") - .HasMaxLength(2147483647) - .HasColumnType("longtext") - .HasColumnName("Webhooks"); - - b.HasKey("Id"); - - b.ToTable("AbpWebhooksSubscriptions", (string)null); - }); - - modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => - { - b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") - .WithOne() - .HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("WebhookEvent"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.EN.md b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.EN.md deleted file mode 100644 index 58bfe8b95..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.EN.md +++ /dev/null @@ -1,69 +0,0 @@ -# LY.MicroService.WebhooksManagement.EntityFrameworkCore - -Webhooks Management Database Migration Module, providing database migration functionality for the webhooks management system. - -[简体中文](./README.md) - -## Features - -* Integrated SaaS multi-tenancy data migration -* Integrated Webhooks Management data migration -* Integrated Setting Management data migration -* Integrated Permission Management data migration -* Integrated Feature Management data migration -* Support for MySQL database - -## Module Dependencies - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(WebhooksManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## Configuration - -```json -{ - "ConnectionStrings": { - "WebhooksManagementDbMigrator": "Your database connection string" - } -} -``` - -## Basic Usage - -1. Configure Database Connection String - * Configure WebhooksManagementDbMigrator connection string in appsettings.json - -2. Add Module Dependency - ```csharp - [DependsOn(typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## Database Tables Description - -* AbpWebhooks - Webhooks basic information table -* AbpWebhookSubscriptions - Webhooks subscriptions table -* AbpWebhookGroups - Webhooks groups table -* AbpWebhookEvents - Webhooks events table -* AbpWebhookSendAttempts - Webhooks send attempts table -* Saas Related Tables - Tenant, edition and other multi-tenancy related data -* AbpSettings - System settings data -* AbpPermissionGrants - Permission authorization data -* AbpFeatures - Feature data - -## More Information - -* [ABP Documentation](https://docs.abp.io) -* [ABP Webhooks Module](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/webhooks-management) diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.md b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.md deleted file mode 100644 index b7a950adf..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# LY.MicroService.WebhooksManagement.EntityFrameworkCore - -Webhooks管理数据迁移模块,提供Webhooks管理系统相关的数据库迁移功能。 - -[English](./README.EN.md) - -## 功能特性 - -* 集成SaaS多租户数据迁移 -* 集成Webhooks管理数据迁移 -* 集成设置管理数据迁移 -* 集成权限管理数据迁移 -* 集成特性管理数据迁移 -* 支持MySQL数据库 - -## 模块依赖 - -```csharp -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(WebhooksManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) -)] -``` - -## 配置项 - -```json -{ - "ConnectionStrings": { - "WebhooksManagementDbMigrator": "你的数据库连接字符串" - } -} -``` - -## 基本用法 - -1. 配置数据库连接字符串 - * 在appsettings.json中配置WebhooksManagementDbMigrator连接字符串 - -2. 添加模块依赖 - ```csharp - [DependsOn(typeof(WebhooksManagementMigrationsEntityFrameworkCoreModule))] - public class YourModule : AbpModule - { - // ... - } - ``` - -## 数据库表说明 - -* AbpWebhooks - Webhooks基本信息表 -* AbpWebhookSubscriptions - Webhooks订阅表 -* AbpWebhookGroups - Webhooks分组表 -* AbpWebhookEvents - Webhooks事件表 -* AbpWebhookSendAttempts - Webhooks发送记录表 -* Saas相关表 - 租户、版本等多租户相关数据 -* AbpSettings - 系统设置数据 -* AbpPermissionGrants - 权限授权数据 -* AbpFeatures - 功能特性数据 - -## 更多信息 - -* [ABP文档](https://docs.abp.io) -* [ABP Webhooks模块](https://github.com/colinin/abp-next-admin/tree/master/aspnet-core/modules/webhooks-management) diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationEventHandler.cs deleted file mode 100644 index d7cfff227..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationEventHandler.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.Extensions.Logging; -using Volo.Abp.Data; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EntityFrameworkCore.Migrations; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -public class WebhooksManagementDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase -{ - public WebhooksManagementDbMigrationEventHandler( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - ITenantStore tenantStore, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory) - { - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs deleted file mode 100644 index 212982149..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using Microsoft.Extensions.Logging; -using System; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.DistributedLocking; -using Volo.Abp.EventBus.Distributed; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -public class WebhooksManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency -{ - public WebhooksManagementDbMigrationService( - ICurrentTenant currentTenant, - IUnitOfWorkManager unitOfWorkManager, - IServiceProvider serviceProvider, - IAbpDistributedLock abpDistributedLock, - IDistributedEventBus distributedEventBus, - ILoggerFactory loggerFactory) - : base( - ConnectionStringNameAttribute.GetConnStringName(), - unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) - { - } -} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs deleted file mode 100644 index b82d84c58..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContext.cs +++ /dev/null @@ -1,23 +0,0 @@ -using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -[ConnectionStringName("WebhooksManagementDbMigrator")] -public class WebhooksManagementMigrationsDbContext : AbpDbContext -{ - public WebhooksManagementMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - modelBuilder.ConfigureWebhooksManagement(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs deleted file mode 100644 index bb01dc63b..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; -using System.IO; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -public class WebhooksManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory -{ - public WebhooksManagementMigrationsDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - var connectionString = configuration.GetConnectionString("Default"); - - var builder = new DbContextOptionsBuilder() - .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new WebhooksManagementMigrationsDbContext(builder!.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.WebhooksManagement.DbMigrator/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } -} diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs deleted file mode 100644 index 2365452da..000000000 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,40 +0,0 @@ -using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.EntityFrameworkCore.MySQL; -using LINGYUN.Abp.Saas.EntityFrameworkCore; -using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; - -namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; - -[DependsOn( - typeof(AbpSaasEntityFrameworkCoreModule), - typeof(WebhooksManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLMicrotingModule), - typeof(AbpSettingManagementEntityFrameworkCoreModule), - typeof(AbpPermissionManagementEntityFrameworkCoreModule), - typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpDataDbMigratorModule) - )] -public class WebhooksManagementMigrationsEntityFrameworkCoreModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - - Configure(options => - { - options.UseMySQL( - mysql => - { - // see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960 - mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant); - }); - }); - } -} diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Settings/IdentitySettingDefinitionProvider.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Settings/IdentitySettingDefinitionProvider.cs index cdd58c583..7326c53cf 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Settings/IdentitySettingDefinitionProvider.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/Settings/IdentitySettingDefinitionProvider.cs @@ -10,17 +10,9 @@ public class IdentitySettingDefinitionProvider : SettingDefinitionProvider { private const string GroupName = "Identity"; private const int GroupOrder = 10; - - protected IStringLocalizerFactory StringLocalizerFactory { get; } - - public IdentitySettingDefinitionProvider(IStringLocalizerFactory stringLocalizerFactory) - { - StringLocalizerFactory = stringLocalizerFactory; - } - public override void Define(ISettingDefinitionContext context) { - var stringLocalizer = StringLocalizerFactory.Create(); + var resourceName = LocalizationResourceNameAttribute.GetName(typeof(IdentityResource)); context.Add( new SettingDefinition( @@ -129,9 +121,9 @@ public class IdentitySettingDefinitionProvider : SettingDefinitionProvider .WithParent("Security", L("Settings:Identity.Security"), order: 5) .WithOrder(0) .WithOptions([ - new NameValue(stringLocalizer["IdentityTwoFactorBehaviour:Optional"].Value, IdentityTwoFactorBehaviour.Optional.ToString()), - new NameValue(stringLocalizer["IdentityTwoFactorBehaviour:Disabled"].Value, IdentityTwoFactorBehaviour.Disabled.ToString()), - new NameValue(stringLocalizer["IdentityTwoFactorBehaviour:Forced"].Value, IdentityTwoFactorBehaviour.Forced.ToString()), + new LocalizableValue(resourceName,"IdentityTwoFactorBehaviour:Optional",IdentityTwoFactorBehaviour.Optional.ToString()), + new LocalizableValue(resourceName,"IdentityTwoFactorBehaviour:Disabled",IdentityTwoFactorBehaviour.Disabled.ToString()), + new LocalizableValue(resourceName,"IdentityTwoFactorBehaviour:Forced",IdentityTwoFactorBehaviour.Forced.ToString()), ]), new SettingDefinition( name: IdentitySettingNames.Security.UsersCanChangeTwoFactor, @@ -194,10 +186,10 @@ public class IdentitySettingDefinitionProvider : SettingDefinitionProvider .WithParent("Session", L("Settings:Identity.Session"), order: 6) .WithOrder(0) .WithOptions([ - new NameValue(stringLocalizer["ConcurrentLoginStrategy:None"].Value, ConcurrentLoginStrategy.None.ToString()), - new NameValue(stringLocalizer["ConcurrentLoginStrategy:LogoutFromSameTypeDevicesLimit"].Value, ConcurrentLoginStrategy.LogoutFromSameTypeDevicesLimit.ToString()), - new NameValue(stringLocalizer["ConcurrentLoginStrategy:LogoutFromSameTypeDevices"].Value, ConcurrentLoginStrategy.LogoutFromSameTypeDevices.ToString()), - new NameValue(stringLocalizer["ConcurrentLoginStrategy:LogoutFromAllDevices"].Value, ConcurrentLoginStrategy.LogoutFromAllDevices.ToString()), + new LocalizableValue(resourceName,"ConcurrentLoginStrategy:None",ConcurrentLoginStrategy.None.ToString()), + new LocalizableValue(resourceName,"ConcurrentLoginStrategy:LogoutFromSameTypeDevicesLimit",ConcurrentLoginStrategy.LogoutFromSameTypeDevicesLimit.ToString()), + new LocalizableValue(resourceName,"ConcurrentLoginStrategy:LogoutFromSameTypeDevices",ConcurrentLoginStrategy.LogoutFromSameTypeDevices.ToString()), + new LocalizableValue(resourceName,"ConcurrentLoginStrategy:LogoutFromAllDevices",ConcurrentLoginStrategy.LogoutFromAllDevices.ToString()), ]), new SettingDefinition( name: IdentitySettingNames.Session.LogoutFromSameTypeDevicesLimit, diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingV2AppServiceBase.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingV2AppServiceBase.cs index 55ca81485..10f47c41a 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingV2AppServiceBase.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingV2AppServiceBase.cs @@ -1,10 +1,12 @@ using Microsoft.AspNetCore.Authorization; +using Microsoft.Extensions.Localization; using System; using System.Linq; using System.Threading.Tasks; using Volo.Abp.Application.Services; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Features; +using Volo.Abp.Localization; using Volo.Abp.SettingManagement; using Volo.Abp.SettingManagement.Localization; using Volo.Abp.Settings; @@ -132,7 +134,24 @@ public abstract class SettingV2AppServiceBase : ApplicationService if (valueType == ValueType.Option) { var options = setting.GetOptions(); - settingDetailsDto?.AddOptions(options.Select(option => new OptionDto(option.Name, option.Value))); + foreach (var option in options) + { + // 本地化选项列表 + var optionNameChars = option.Name.Split(';'); + if (optionNameChars.Length == 2 && + optionNameChars[0].StartsWith("N:") && + optionNameChars[1].StartsWith("L:")) + { + var optionName = optionNameChars[0].RemovePreFix("N:"); + var optionResourceName = optionNameChars[1].RemovePreFix("L:"); + var optionLocalizeName = new LocalizableString(optionName, optionResourceName).Localize(StringLocalizerFactory); + settingDetailsDto?.AddOption(optionLocalizeName.Value, option.Value); + } + else + { + settingDetailsDto?.AddOption(option.Name, option.Value); + } + } } var slot = setting.GetSlotOrNull(); diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.Configure.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.Configure.cs new file mode 100644 index 000000000..68d809820 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.Configure.cs @@ -0,0 +1,443 @@ +using DotNetCore.CAP; +using LINGYUN.Abp.AI; +using LINGYUN.Abp.AI.Agent; +using LINGYUN.Abp.AIManagement; +using LINGYUN.Abp.AIManagement.Chats; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.LocalizationManagement; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.Wrapper; +using Medallion.Threading; +using Medallion.Threading.Redis; +using Microsoft.Agents.AI; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Cors; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Caching.StackExchangeRedis; +using Microsoft.IdentityModel.Logging; +using Microsoft.IdentityModel.Tokens; +using Microsoft.OpenApi; +using StackExchange.Redis; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Text.Encodings.Web; +using System.Text.Unicode; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; +using Volo.Abp.Auditing; +using Volo.Abp.Caching; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.FeatureManagement; +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Http.Client; +using Volo.Abp.Identity.Localization; +using Volo.Abp.Json; +using Volo.Abp.Json.SystemTextJson; +using Volo.Abp.Localization; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; +using Volo.Abp.Security.Claims; +using Volo.Abp.SettingManagement; +using Volo.Abp.Threading; +using Volo.Abp.Timing; +using Volo.Abp.VirtualFileSystem; + +namespace LINGYUN.Abp.MicroService.AIService; + +public partial class AIServiceModule +{ + public static string ApplicationName { get; set; } = "AIService"; + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + private void PreConfigureFeature() + { + OneTimeRunner.Run(() => + { + GlobalFeatureManager.Instance.Modules.Editions().EnableAll(); + }); + } + + private void PreConfigureApp(IConfiguration configuration) + { + PreConfigure(options => + { + // 以开放端口区别,应在0-31之间 + options.SnowflakeIdOptions.WorkerId = 19; + options.SnowflakeIdOptions.WorkerIdBits = 5; + options.SnowflakeIdOptions.DatacenterId = 1; + }); + + if (configuration.GetValue("App:ShowPii")) + { + IdentityModelEventSource.ShowPII = true; + } + } + + private void PreConfigureCAP(IConfiguration configuration) + { + PreConfigure(options => + { + options + .UseMySql(sqlOptions => + { + configuration.GetSection("CAP:MySql").Bind(sqlOptions); + }) + .UseRabbitMQ(rabbitMQOptions => + { + configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions); + }) + .UseDashboard(); + }); + } + + private void ConfigureTextTemplating() + { + Configure(options => + { + options.IsDynamicTemplateDefinitionStoreEnabled = true; + }); + } + + private void ConfigureFeatureManagement() + { + Configure(options => + { + options.IsDynamicFeatureStoreEnabled = true; + }); + } + + private void ConfigureJsonSerializer(IConfiguration configuration) + { + // 统一时间日期格式 + Configure(options => + { + var jsonConfiguration = configuration.GetSection("Json"); + if (jsonConfiguration.Exists()) + { + jsonConfiguration.Bind(options); + } + }); + // 中文序列化的编码问题 + Configure(options => + { + options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + }); + } + + private void ConfigureAIManagement() + { + Configure(options => + { + options.ChatClientBuildActions.Add((_, __, builder) => + { + return Task.FromResult(builder + .UseLogging() + .UseOpenTelemetry() + .UseDistributedCache()); + }); + }); + + Configure(options => + { + options.AgentBuildActions.Add((_, builder) => + { + return Task.FromResult(builder + .UseLogging() + .UseOpenTelemetry()); + }); + }); + + Configure(options => + { + options.IsDynamicWorkspaceStoreEnabled = true; + options.SaveStaticWorkspacesToDatabase = true; + + options.IsDynamicAIToolStoreEnabled = true; + options.SaveStaticAIToolsToDatabase = true; + }); + } + + private void ConfigurePermissionManagement() + { + Configure(options => + { + options.IsDynamicPermissionStoreEnabled = true; + }); + } + + private void ConfigureSettingManagement() + { + Configure(options => + { + options.IsDynamicSettingStoreEnabled = true; + }); + } + + private void ConfigureTiming(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("Clock").Bind(options); + }); + } + + private void ConfigureCaching(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("DistributedCache").Bind(options); + }); + + Configure(options => + { + options.AutoEventSelectors.AddNamespace("Volo.Abp.TenantManagement"); + }); + + Configure(options => + { + var redisConfig = ConfigurationOptions.Parse(options.Configuration!); + options.ConfigurationOptions = redisConfig; + options.InstanceName = configuration["Redis:InstanceName"]; + }); + } + + private void ConfigureDistributedLocking(IServiceCollection services, IConfiguration configuration) + { + var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; + if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) + { + services.AddSingleton(sp => + { + var connectionMultiplexer = sp.GetRequiredService(); + return new RedisDistributedSynchronizationProvider(connectionMultiplexer.GetDatabase()); + }); + } + } + + private void ConfigureMvc(IServiceCollection services, IConfiguration configuration) + { + Configure(options => + { + options.ExposeIntegrationServices = true; + }); + } + + private void ConfigureVirtualFileSystem() + { + Configure(options => + { + options.FileSets.AddEmbedded("LINGYUN.Abp.MicroService.AIService"); + }); + } + + private void ConfigureMultiTenancy(IConfiguration configuration) + { + // 多租户 + Configure(options => + { + options.IsEnabled = true; + }); + + var tenantResolveCfg = configuration.GetSection("App:Domains"); + if (tenantResolveCfg.Exists()) + { + Configure(options => + { + var domains = tenantResolveCfg.Get() ?? []; + foreach (var domain in domains) + { + options.AddDomainTenantResolver(domain); + } + }); + } + } + + private void ConfigureIdentity(IConfiguration configuration) + { + Configure(options => + { + options.IsDynamicClaimsEnabled = true; + options.RemoteRefreshUrl = configuration["App:RefreshClaimsUrl"] + options.RemoteRefreshUrl; + }); + } + + private void ConfigureAuditing(IConfiguration configuration) + { + Configure(options => + { + // 是否启用实体变更记录 + var allEntitiesSelectorIsEnabled = configuration["Auditing:AllEntitiesSelector"]; + if (allEntitiesSelectorIsEnabled.IsNullOrWhiteSpace() || + (bool.TryParse(allEntitiesSelectorIsEnabled, out var enabled) && enabled)) + { + options.EntityHistorySelectors.AddAllEntities(); + } + }); + } + + private void ConfigureSwagger(IServiceCollection services, IConfiguration configuration) + { + // Swagger + services.AddAbpSwaggerGenWithOAuth( + configuration["AuthServer:Authority"]!, + new Dictionary + { + { configuration["AuthServer:Audience"]!, "Identity Service API"} + }, + options => + { + options.SwaggerDoc("v1", new OpenApiInfo + { + Title = "AI Service API", Version = "v1", + Contact = new OpenApiContact + { + Name = "colin", + Email = "colin.in@foxmail.com", + Url = new Uri("https://github.com/colinin") + }, + License = new OpenApiLicense + { + Name = "MIT", + Url = new Uri("https://github.com/colinin/abp-next-admin/blob/master/LICENSE") + } + }); + options.DocInclusionPredicate((docName, description) => true); + options.CustomSchemaIds(type => type.FullName); + options.DescribeAllParametersInCamelCase(); + + var xmlDocFiles = new List(); + xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml")); + xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml")); + + foreach (var xmlDocFile in xmlDocFiles) + { + options.IncludeXmlComments(xmlDocFile); + } + + options.SchemaFilter(); + options.OperationFilter(); + }); + } + + private void ConfigureLocalization() + { + // 支持本地化语言类型 + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + + options.Resources + .Get() + .AddVirtualJson("/Localization/Resources"); + }); + + Configure(options => + { + var zhHansCultureMapInfo = new CultureMapInfo + { + TargetCulture = "zh-Hans", + SourceCultures = new string[] { "zh", "zh_CN", "zh-CN" } + }; + + options.CulturesMaps.Add(zhHansCultureMapInfo); + options.UiCulturesMaps.Add(zhHansCultureMapInfo); + }); + + Configure(options => + { + options.SaveStaticLocalizationsToDatabase = true; + }); + } + + private void ConfigureCors(IServiceCollection services, IConfiguration configuration) + { + services.AddCors(options => + { + options.AddDefaultPolicy(builder => + { + var corsOrigins = configuration.GetSection("App:CorsOrigins").Get>(); + if (corsOrigins == null || corsOrigins.Count == 0) + { + corsOrigins = configuration["App:CorsOrigins"]? + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToList() ?? new List(); + } + builder + .WithOrigins(corsOrigins + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .WithAbpWrapExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false) + { + Configure(options => + { + options.TokenCookie.HttpOnly = false; + options.TokenCookie.SameSite = SameSiteMode.Lax; + }); + + services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) + .AddAbpJwtBearer(options => + { + configuration.GetSection("AuthServer").Bind(options); + + var validIssuers = configuration.GetSection("AuthServer:ValidIssuers").Get>(); + if (validIssuers?.Count > 0) + { + options.TokenValidationParameters.ValidIssuers = validIssuers; + options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator; + } + var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get>(); + if (validAudiences?.Count > 0) + { + options.TokenValidationParameters.ValidAudiences = validAudiences; + } + }); + + services + .AddDataProtection() + .SetApplicationName("LINGYUN.Abp.Application") + .PersistKeysToStackExchangeRedis(() => + { + var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]!); + + return redis.GetDatabase(); + }, + "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); + } + + private void ConfigureWrapper() + { + Configure(options => + { + options.IsEnabled = true; + + options.IgnoreControllers.Add(); + }); + } + + private void PreConfigureWrapper() + { + // 服务间调用不包装 + PreConfigure(options => + { + options.ProxyClientActions.Add( + (_, _, client) => + { + client.DefaultRequestHeaders.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true"); + }); + }); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.cs new file mode 100644 index 000000000..0e3a4980d --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/AIServiceModule.cs @@ -0,0 +1,159 @@ +using LINGYUN.Abp.AI.Ollama; +using LINGYUN.Abp.AI.Tools; +using LINGYUN.Abp.AI.Tools.Http; +using LINGYUN.Abp.AI.Tools.Mcp; +using LINGYUN.Abp.AIManagement; +using LINGYUN.Abp.AspNetCore.HttpOverrides; +using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; +using LINGYUN.Abp.AspNetCore.Session; +using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.Claims.Mapping; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Dynamic.Definitions; +using LINGYUN.Abp.Emailing.Platform; +using LINGYUN.Abp.EventBus.CAP; +using LINGYUN.Abp.ExceptionHandling.Emailing; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.Logging.Serilog.Elasticsearch; +using LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore; +using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.TextTemplating.Scriban; +using Volo.Abp; +using Volo.Abp.AspNetCore.Authentication.JwtBearer; +using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Autofac; +using Volo.Abp.Caching.StackExchangeRedis; +using Volo.Abp.Http.Client.IdentityModel.Web; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.OpenIddict; +using Volo.Abp.Swashbuckle; + +namespace LINGYUN.Abp.MicroService.AIService; + +[DependsOn( + typeof(AbpCAPEventBusModule), + typeof(AbpSerilogEnrichersApplicationModule), + typeof(AbpSerilogEnrichersUniqueIdModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpLoggingSerilogElasticsearchModule), + typeof(AbpAuditLoggingElasticsearchModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpPermissionManagementDomainOpenIddictModule), + typeof(AbpTextTemplatingScribanModule), + typeof(AbpAIOllamaModule), + typeof(AbpAIToolsModule), + typeof(AbpAIToolsHttpModule), + typeof(AbpAIToolsMcpModule), + typeof(AbpAIManagementApplicationModule), + typeof(AbpAIManagementHttpApiModule), + typeof(AIServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), + typeof(AbpAspNetCoreAuthenticationJwtBearerModule), + typeof(AbpEmailingExceptionHandlingModule), + typeof(AbpHttpClientIdentityModelWebModule), + typeof(AbpSmsPlatformModule), + typeof(AbpEmailingPlatformModule), + typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpLocalizationCultureMapModule), + typeof(AbpAspNetCoreSessionModule), + typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpDynamicDefinitionsModule), + typeof(AbpClaimsMappingModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAutofacModule) + )] +public partial class AIServiceModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + + PreConfigureWrapper(); + PreConfigureFeature(); + PreConfigureApp(configuration); + PreConfigureCAP(configuration); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + var hostingEnvironment = context.Services.GetHostingEnvironment(); + var configuration = context.Services.GetConfiguration(); + + ConfigureWrapper(); + ConfigureLocalization(); + ConfigureVirtualFileSystem(); + ConfigureTextTemplating(); + ConfigureAIManagement(); + ConfigureSettingManagement(); + ConfigureFeatureManagement(); + ConfigurePermissionManagement(); + ConfigureIdentity(configuration); + ConfigureTiming(configuration); + ConfigureCaching(configuration); + ConfigureAuditing(configuration); + ConfigureMultiTenancy(configuration); + ConfigureJsonSerializer(configuration); + ConfigureMvc(context.Services, configuration); + ConfigureCors(context.Services, configuration); + if (hostingEnvironment.IsDevelopment()) + { + ConfigureSwagger(context.Services, configuration); + } + ConfigureDistributedLocking(context.Services, configuration); + ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var configuration = context.GetConfiguration(); + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + app.UseForwardedHeaders(); + // 本地化 + app.UseMapRequestLocalization(); + // http调用链 + app.UseCorrelationId(); + // 文件系统 + app.MapAbpStaticAssets(); + // 路由 + app.UseRouting(); + // 跨域 + app.UseCors(); + // 认证 + app.UseAuthentication(); + app.UseJwtTokenMiddleware(); + // 多租户 + app.UseMultiTenancy(); + // jwt + app.UseDynamicClaims(); + // 授权 + app.UseAuthorization(); + + if (env.IsDevelopment()) + { + // Swagger + app.UseSwagger(); + // Swagger可视化界面 + app.UseAbpSwaggerUI(options => + { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support AI Service API"); + + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthScopes(configuration["AuthServer:Audience"]); + }); + } + // 审计日志 + app.UseAuditing(); + app.UseAbpSerilogEnrichers(); + // 路由 + app.UseConfiguredEndpoints(); + } +} + diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Dockerfile b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Dockerfile new file mode 100644 index 000000000..cda07e0df --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Dockerfile @@ -0,0 +1,36 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +WORKDIR /src + +# copy props +COPY common.props ./ +COPY common.secrets.props ./ +COPY configureawait.props ./ +COPY Directory.Build.props ./ +COPY Directory.Packages.props ./ +COPY NuGet.Config ./ + +# copy csproj +COPY aspnet-core/services/LINGYUN.Abp.MicroService.AIService/ ./aspnet-core/services/LINGYUN.Abp.MicroService.AIService/ + +# framework +COPY aspnet-core/framework/ ./aspnet-core/framework/ + +# migrations +COPY aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/ ./aspnet-core/migrations/LINGYUN.Abp.MicroService.AIService.EntityFrameworkCore/ + +# modules +COPY aspnet-core/modules/ ./aspnet-core/modules/ + +# dotnet restore +RUN dotnet restore aspnet-core/services/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj + +# dotnet publish +WORKDIR /src/aspnet-core/services/LINGYUN.Abp.MicroService.AIService +RUN dotnet publish -c Release -o /app/publish --no-restore + +# dotnet run +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final +WORKDIR /app +COPY --from=build /app/publish . + +ENTRYPOINT ["dotnet", "LINGYUN.Abp.MicroService.AIService.dll"] \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj new file mode 100644 index 000000000..ec928f2b5 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj @@ -0,0 +1,74 @@ + + + + net10.0 + enable + enable + LINGYUN.Abp.MicroService.AIService + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Program.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Program.cs new file mode 100644 index 000000000..45e0fe37f --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Program.cs @@ -0,0 +1,65 @@ +using LINGYUN.Abp.MicroService.AIService; +using Serilog; +using Volo.Abp.IO; +using Volo.Abp.Modularity.PlugIns; + +public class Program +{ + public async static Task Main(string[] args) + { + try + { + Console.Title = "AIService"; + Log.Information("Starting AIService."); + + var builder = WebApplication.CreateBuilder(args); + builder.Host.AddAppSettingsSecretsJson() + .UseAutofac() + .ConfigureAppConfiguration((context, config) => + { + if (context.Configuration.GetValue("AgileConfig:IsEnabled", false)) + { + config.AddAgileConfig(new AgileConfig.Client.ConfigClient(context.Configuration)); + } + }) + .UseSerilog((context, provider, config) => + { + config.ReadFrom.Configuration(context.Configuration); + }); + await builder.AddApplicationAsync(options => + { + AIServiceModule.ApplicationName = Environment.GetEnvironmentVariable("APPLICATION_NAME") + ?? AIServiceModule.ApplicationName; + options.ApplicationName = AIServiceModule.ApplicationName; + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(AIServiceModule).Assembly; + // 搜索 Modules 目录下所有文件作为插件 + // 取消显示引用所有其他项目的模块,改为通过插件的形式引用 + var pluginFolder = Path.Combine( + Directory.GetCurrentDirectory(), "Modules"); + DirectoryHelper.CreateIfNotExists(pluginFolder); + options.PlugInSources.AddFolder( + pluginFolder, + SearchOption.AllDirectories); + }); + var app = builder.Build(); + await app.InitializeApplicationAsync(); + await app.RunAsync(); + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + Console.WriteLine("Host terminated unexpectedly!"); + Console.WriteLine(ex.ToString()); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } +} + diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Properties/launchSettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Properties/launchSettings.json new file mode 100644 index 000000000..aa70aac8f --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5145", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/EnumDescriptionSchemaFilter.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/EnumDescriptionSchemaFilter.cs new file mode 100644 index 000000000..ddf19cb69 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/EnumDescriptionSchemaFilter.cs @@ -0,0 +1,40 @@ +using Microsoft.OpenApi; +using System.ComponentModel; +using System.Reflection; + +namespace Swashbuckle.AspNetCore.SwaggerGen; + +#nullable enable +public class EnumDescriptionSchemaFilter : ISchemaFilter +{ + public void Apply(IOpenApiSchema schema, SchemaFilterContext context) + { + if (context.Type.IsEnum) + { + var enumType = context.Type; + var enumValues = Enum.GetValues(enumType); + var underlyingType = Enum.GetUnderlyingType(enumType); + + var enumDesc = enumType.GetCustomAttribute()?.Description ?? enumType.Name; + schema.Description += $"{enumDesc}
"; + + schema.Description += "

Options:

    "; + + foreach (var value in enumValues) + { + string? description = default!; + var name = Enum.GetName(enumType, value); + if (name != null) + { + var memberInfo = enumType.GetMember(name)[0]; + description = memberInfo.GetCustomAttribute()?.Description ?? name; + } + var numericValue = Convert.ChangeType(value, underlyingType); + schema.Description += $"
  • {numericValue}: {name}({description ?? "No description."})
  • "; + } + + schema.Description += "
"; + } + } +} +#nullable disable diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/TenantHeaderParamter.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/TenantHeaderParamter.cs new file mode 100644 index 000000000..db9c69424 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/Swashbuckle/AspNetCore/SwaggerGen/TenantHeaderParamter.cs @@ -0,0 +1,34 @@ +using Microsoft.Extensions.Options; +using Microsoft.OpenApi; +using Volo.Abp.AspNetCore.MultiTenancy; +using Volo.Abp.MultiTenancy; + +namespace Swashbuckle.AspNetCore.SwaggerGen; + +public class TenantHeaderParamter : IOperationFilter +{ + private readonly AbpMultiTenancyOptions _multiTenancyOptions; + private readonly AbpAspNetCoreMultiTenancyOptions _aspNetCoreMultiTenancyOptions; + public TenantHeaderParamter( + IOptions multiTenancyOptions, + IOptions aspNetCoreMultiTenancyOptions) + { + _multiTenancyOptions = multiTenancyOptions.Value; + _aspNetCoreMultiTenancyOptions = aspNetCoreMultiTenancyOptions.Value; + } + + public void Apply(OpenApiOperation operation, OperationFilterContext context) + { + if (_multiTenancyOptions.IsEnabled) + { + operation.Parameters ??= new List(); + operation.Parameters.Add(new OpenApiParameter + { + Name = _aspNetCoreMultiTenancyOptions.TenantKey, + In = ParameterLocation.Header, + Description = "Tenant Id in http header", + Required = false + }); + } + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.Development.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.Development.json new file mode 100644 index 000000000..58b86bf10 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.Development.json @@ -0,0 +1,153 @@ +{ + "AgileConfig": { + "IsEnabled": false, + "env": "DEV", + "appId": "LINGYUN.Abp.AIService", + "secret": "1q2w3E*", + "nodes": "http://localhost:5000", + "name": "LINGYUN.Abp.AIService", + "tag": "LINGYUN.Abp.AIService", + "configCacheEncrypt": true + }, + "App": { + "ShowPii": true, + "CorsOrigins": [ "http://localhost:5666" ], + "RefreshClaimsUrl": "http://localhost:30015" + }, + "Auditing": { + "AllEntitiesSelector": true + }, + "DistributedCache": { + "HideErrors": true, + "KeyPrefix": "LINGYUN.Abp.Application", + "GlobalCacheEntryOptions": { + "SlidingExpiration": "30:00:00", + "AbsoluteExpirationRelativeToNow": "60:00:00" + } + }, + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "DistributedLock": { + "IsEnabled": true, + "Redis": { + "Configuration": "localhost,defaultDatabase=15" + } + }, + "OpenTelemetry": { + "IsEnabled": true, + "ZipKin": { + "Endpoint": "http://localhost:9411/api/v2/spans" + } + }, + "RemoteServices": { + "Platform": { + "BaseUrl": "http://localhost:30025", + "UseCurrentAccessToken": false + } + }, + "IdentityClients": { + "InternalServiceClient": { + "Authority": "http://localhost:44385", + "RequireHttps": false, + "GrantType": "client_credentials", + "Scope": "lingyun-abp-application", + "ClientId": "InternalServiceClient", + "ClientSecret": "1q2w3E*" + } + }, + "CAP": { + "EventBus": { + "DefaultGroupName": "AIService", + "GroupNamePrefix": "Dev", + "Version": "v1", + "FailedRetryInterval": 300, + "FailedRetryCount": 10 + }, + "MySql": { + "TableNamePrefix": "ai", + "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "RabbitMQ": { + "HostName": "localhost", + "Port": 5672, + "UserName": "admin", + "Password": "123456", + "ExchangeName": "LINGYUN.Abp.Application", + "VirtualHost": "/" + } + }, + "Redis": { + "Configuration": "localhost,defaultDatabase=10", + "InstanceName": "LINGYUN.Abp.Application" + }, + "AuthServer": { + "Authority": "http://localhost:44385/", + "Audience": "ai-service", + "ValidAudiences": [ "lingyun-abp-application" ], + "MapInboundClaims": false, + "RequireHttpsMetadata": false, + "SwaggerClientId": "vue-oauth-client" + }, + "Logging": { + "Serilog": { + "Elasticsearch": { + "IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}" + } + } + }, + "AuditLogging": { + "Elasticsearch": { + "IndexPrefix": "abp.dev.auditing" + } + }, + "Elasticsearch": { + "NodeUris": "http://localhost:9200" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + }, + { + "Name": "Elasticsearch", + "Args": { + "nodeUris": "http://localhost:9200", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", + "autoRegisterTemplate": true, + "autoRegisterTemplateVersion": "ESv7" + } + }, + { + "Name": "OpenTelemetry", + "Args": { + "endpoint": "http://localhost:4318", + "protocol": "HttpProtobuf", + "resourceAttributes": { + "service.name": "AIService", + "deployment.environment": "development" + } + } + } + ] + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.json new file mode 100644 index 000000000..5726edd6f --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AIService/appsettings.json @@ -0,0 +1,114 @@ +{ + "Clock": { + "Kind": "Local" + }, + "Forwarded": { + "ForwardedHeaders": "XForwardedFor,XForwardedProto" + }, + "AntiForgery": { + "AutoValidate": false + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Json": { + "OutputDateTimeFormat": "yyyy-MM-dd HH:mm:ss", + "InputDateTimeFormats": [ + "yyyy-MM-dd HH:mm:ss", + "yyyy-MM-ddTHH:mm:ss" + ] + }, + "SkyWalking": { + "Enable": false + }, + "AllowedHosts": "*", + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft.EntityFrameworkCore": "Warning", + "System": "Warning", + "Microsoft": "Warning" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + } + ] + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.Configure.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.Configure.cs new file mode 100644 index 000000000..8c11b59f5 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.Configure.cs @@ -0,0 +1,508 @@ +using DotNetCore.CAP; +using LINGYUN.Abp.DataProtectionManagement; +using LINGYUN.Abp.ExceptionHandling; +using LINGYUN.Abp.ExceptionHandling.Emailing; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.LocalizationManagement; +using LINGYUN.Abp.Saas; +using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.Wrapper; +using Medallion.Threading; +using Medallion.Threading.Redis; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Cors; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Caching.StackExchangeRedis; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.IdentityModel.Logging; +using Microsoft.IdentityModel.Tokens; +using Microsoft.OpenApi; +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Encodings.Web; +using System.Text.Unicode; +using Volo.Abp; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; +using Volo.Abp.Auditing; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Caching; +using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.FeatureManagement; +using Volo.Abp.Features; +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Http.Client; +using Volo.Abp.Identity.Localization; +using Volo.Abp.Json; +using Volo.Abp.Json.SystemTextJson; +using Volo.Abp.Localization; +using Volo.Abp.MultiTenancy; +using Volo.Abp.OpenIddict.Tokens; +using Volo.Abp.PermissionManagement; +using Volo.Abp.Security.Claims; +using Volo.Abp.SettingManagement; +using Volo.Abp.Threading; +using Volo.Abp.Timing; +using Volo.Abp.VirtualFileSystem; + +namespace LINGYUN.Abp.MicroService.AdminService; + +public partial class AdminServiceModule +{ + public static string ApplicationName { get; set; } = "AdminService"; + protected const string DefaultCorsPolicyName = "Default"; + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + private void PreConfigureFeature() + { + OneTimeRunner.Run(() => + { + GlobalFeatureManager.Instance.Modules.Editions().EnableAll(); + }); + } + + private void PreConfigureApp(IConfiguration configuration) + { + AbpSerilogEnrichersConsts.ApplicationName = ApplicationName; + + PreConfigure(options => + { + // 以开放端口区别,应在0-31之间 + options.SnowflakeIdOptions.WorkerId = 10; + options.SnowflakeIdOptions.WorkerIdBits = 5; + options.SnowflakeIdOptions.DatacenterId = 1; + }); + + if (configuration.GetValue("App:ShowPii")) + { + IdentityModelEventSource.ShowPII = true; + } + } + + private void PreConfigureCAP(IConfiguration configuration) + { + PreConfigure(options => + { + options + .UseMySql(mySqlOptions => + { + configuration.GetSection("CAP:MySql").Bind(mySqlOptions); + }) + .UseRabbitMQ(rabbitMQOptions => + { + configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions); + }) + .UseDashboard(); + }); + } + + private void ConfigureTextTemplating() + { + Configure(options => + { + options.IsDynamicTemplateDefinitionStoreEnabled = true; + }); + } + + private void ConfigureFeatureManagement() + { + Configure(options => + { + options.ProviderPolicies[EditionFeatureValueProvider.ProviderName] = AbpSaasPermissions.Editions.ManageFeatures; + options.ProviderPolicies[TenantFeatureValueProvider.ProviderName] = AbpSaasPermissions.Tenants.ManageFeatures; + + options.IsDynamicFeatureStoreEnabled = true; + }); + } + + private void ConfigureJsonSerializer(IConfiguration configuration) + { + // 统一时间日期格式 + Configure(options => + { + var jsonConfiguration = configuration.GetSection("Json"); + if (jsonConfiguration.Exists()) + { + jsonConfiguration.Bind(options); + } + }); + // 中文序列化的编码问题 + Configure(options => + { + options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + }); + } + + private void ConfigurePermissionManagement() + { + Configure(options => + { + options.IsDynamicPermissionStoreEnabled = true; + // Rename IdentityServer.Client.ManagePermissions + // See https://github.com/abpframework/abp/blob/dev/modules/identityserver/src/Volo.Abp.PermissionManagement.Domain.IdentityServer/Volo/Abp/PermissionManagement/IdentityServer/AbpPermissionManagementDomainIdentityServerModule.cs + options.ProviderPolicies[ClientPermissionValueProvider.ProviderName] = "AbpOpenIddict.Applications.ManagePermissions"; + }); + } + + private void ConfigureDataProtectedManagement() + { + Configure(options => + { + //options.AddEntities(typeof(IdentityResource), new Type[] + //{ + // typeof(IdentityUser), + // typeof(IdentityRole), + // typeof(OrganizationUnit), + //}); + + //options.AddEntities(typeof(IdentityResource), new Type[] + //{ + // typeof(IdentityUser), + // typeof(IdentityRole), + // typeof(OrganizationUnit), + //}); + }); + } + + private void ConfigureSettingManagement() + { + Configure(options => + { + options.IsDynamicSettingStoreEnabled = true; + }); + } + + private void ConfigureBackgroundWorker() + { + Configure(options => + { + options.IsCleanupEnabled = false; + }); + } + + private void ConfigureExceptionHandling() + { + // 自定义需要处理的异常 + Configure(options => + { + // 加入需要处理的异常类型 + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + options.Handlers.Add(); + }); + + // 自定义需要发送邮件通知的异常类型 + Configure(options => + { + // 是否发送堆栈信息 + options.SendStackTrace = true; + // 未指定异常接收者的默认接收邮件 + // 请指定自己的邮件地址 + // options.DefaultReceiveEmail = ""; + }); + } + + private void ConfigureTiming(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("Clock").Bind(options); + }); + } + + private void ConfigureCaching(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("DistributedCache").Bind(options); + }); + + Configure(options => + { + options.AutoEventSelectors.AddNamespace("Volo.Abp.TenantManagement"); + }); + + Configure(options => + { + var redisConfig = ConfigurationOptions.Parse(options.Configuration); + options.ConfigurationOptions = redisConfig; + options.InstanceName = configuration["Redis:InstanceName"]; + }); + } + + private void ConfigureDistributedLocking(IServiceCollection services, IConfiguration configuration) + { + var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; + if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) + { + services.AddSingleton(_ => + { + return new RedisDistributedSynchronizationProvider( + ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase()); + }); + } + } + + private void ConfigureMvc(IServiceCollection services, IConfiguration configuration) + { + Configure(options => + { + options.ExposeIntegrationServices = true; + }); + + Configure(options => + { + options.EndpointConfigureActions.Add((builder) => + { + builder.Endpoints.MapHealthChecks(configuration["App:HealthChecks"] ?? "/healthz"); + }); + }); + + services.AddHealthChecks(); + } + + private void ConfigureVirtualFileSystem() + { + Configure(options => + { + options.FileSets.AddEmbedded("LINGYUN.Abp.MicroService.AdminService"); + }); + } + + private void ConfigureMultiTenancy(IConfiguration configuration) + { + // 多租户 + Configure(options => + { + options.IsEnabled = true; + }); + + var tenantResolveCfg = configuration.GetSection("App:Domains"); + if (tenantResolveCfg.Exists()) + { + Configure(options => + { + var domains = tenantResolveCfg.Get(); + foreach (var domain in domains) + { + options.AddDomainTenantResolver(domain); + } + }); + } + } + + private void ConfigureIdentity(IConfiguration configuration) + { + Configure(options => + { + options.IsDynamicClaimsEnabled = true; + options.RemoteRefreshUrl = configuration["App:RefreshClaimsUrl"] + options.RemoteRefreshUrl; + }); + } + + private void ConfigureAuditing(IConfiguration configuration) + { + Configure(options => + { + options.ApplicationName = ApplicationName; + // 是否启用实体变更记录 + var allEntitiesSelectorIsEnabled = configuration["Auditing:AllEntitiesSelector"]; + if (allEntitiesSelectorIsEnabled.IsNullOrWhiteSpace() || + (bool.TryParse(allEntitiesSelectorIsEnabled, out var enabled) && enabled)) + { + options.EntityHistorySelectors.AddAllEntities(); + } + }); + } + + private void ConfigureSwagger(IServiceCollection services, IConfiguration configuration) + { + // Swagger + services.AddAbpSwaggerGenWithOAuth( + configuration["AuthServer:Authority"], + new Dictionary + { + { configuration["AuthServer:Audience"], "Admin Service API"} + }, + options => + { + options.SwaggerDoc("v1", new OpenApiInfo + { + Title = "Admin Service API", Version = "v1", + Contact = new OpenApiContact + { + Name = "colin", + Email = "colin.in@foxmail.com", + Url = new Uri("https://github.com/colinin") + }, + License = new OpenApiLicense + { + Name = "MIT", + Url = new Uri("https://github.com/colinin/abp-next-admin/blob/master/LICENSE") + } + }); + options.DocInclusionPredicate((docName, description) => true); + options.CustomSchemaIds(type => type.FullName); + options.DescribeAllParametersInCamelCase(); + + var xmlDocFiles = new List(); + xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "LINGYUN.Abp.*.xml")); + xmlDocFiles.AddIfNotContains(Directory.GetFiles(AppContext.BaseDirectory, "Volo.Abp.*.xml")); + + foreach (var xmlDocFile in xmlDocFiles) + { + options.IncludeXmlComments(xmlDocFile); + } + + options.OperationFilter(); + }); + } + + private void ConfigureLocalization() + { + // 支持本地化语言类型 + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + + options.Resources + .Get() + .AddVirtualJson("/Localization/Resources"); + options + .AddLanguagesMapOrUpdate( + "vue-admin-element-ui", + new NameValue("zh-Hans", "zh"), + new NameValue("en", "en")); + + // vben admin 语言映射 + options + .AddLanguagesMapOrUpdate( + "vben-admin-ui", + new NameValue("zh_CN", "zh-Hans")); + }); + + Configure(options => + { + var zhHansCultureMapInfo = new CultureMapInfo + { + TargetCulture = "zh-Hans", + SourceCultures = new string[] { "zh", "zh_CN", "zh-CN" } + }; + + options.CulturesMaps.Add(zhHansCultureMapInfo); + options.UiCulturesMaps.Add(zhHansCultureMapInfo); + }); + + Configure(options => + { + options.SaveStaticLocalizationsToDatabase = true; + }); + } + + private void ConfigureCors(IServiceCollection services, IConfiguration configuration) + { + services.AddCors(options => + { + options.AddDefaultPolicy(builder => + { + var corsOrigins = configuration.GetSection("App:CorsOrigins").Get>(); + if (corsOrigins == null || corsOrigins.Count == 0) + { + corsOrigins = configuration["App:CorsOrigins"]? + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToList() ?? new List(); + } + builder + .WithOrigins(corsOrigins + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .WithAbpWrapExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false) + { + services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) + .AddAbpJwtBearer(options => + { + configuration.GetSection("AuthServer").Bind(options); + + var validIssuers = configuration.GetSection("AuthServer:ValidIssuers").Get>(); + var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get>(); + if (validIssuers?.Count > 0) + { + options.TokenValidationParameters.ValidIssuers = validIssuers; + options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator; + } + if (validAudiences?.Count > 0) + { + options.TokenValidationParameters.ValidAudiences = validAudiences; + } + }); + + + Configure(options => + { + configuration.GetSection("AntiForgery").Bind(options); + }); + + services.AddDataProtection() + .SetApplicationName("LINGYUN.Abp.Application") + .PersistKeysToStackExchangeRedis(() => + { + return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase(); + }, + "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); + } + + private void ConfigureWrapper() + { + Configure(options => + { + options.IsEnabled = true; + }); + } + + private void PreConfigureWrapper() + { + //PreConfigure(options => + //{ + // options.ProxyRequestActions.Add( + // (appid, httprequestmessage) => + // { + // httprequestmessage.Headers.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true"); + // }); + //}); + // 服务间调用不包装 + PreConfigure(options => + { + options.ProxyClientActions.Add( + (_, _, client) => + { + client.DefaultRequestHeaders.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true"); + }); + }); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.cs new file mode 100644 index 000000000..fbfb7cae9 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.cs @@ -0,0 +1,216 @@ +using LINGYUN.Abp.Aliyun.SettingManagement; +using LINGYUN.Abp.AspNetCore.HttpOverrides; +using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; +using LINGYUN.Abp.AspNetCore.Session; +using LINGYUN.Abp.Auditing; +using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.BlobManagement.SettingManagement; +using LINGYUN.Abp.CachingManagement; +using LINGYUN.Abp.CachingManagement.StackExchangeRedis; +using LINGYUN.Abp.Claims.Mapping; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.DataProtectionManagement; +using LINGYUN.Abp.Dynamic.Definitions; +using LINGYUN.Abp.Emailing.Platform; +using LINGYUN.Abp.EventBus.CAP; +using LINGYUN.Abp.ExceptionHandling.Emailing; +using LINGYUN.Abp.FeatureManagement; +using LINGYUN.Abp.FeatureManagement.HttpApi; +using LINGYUN.Abp.Identity.EntityFrameworkCore; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; +using LINGYUN.Abp.Logging.Serilog.Elasticsearch; +using LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore; +using LINGYUN.Abp.PermissionManagement; +using LINGYUN.Abp.PermissionManagement.HttpApi; +using LINGYUN.Abp.PermissionManagement.OrganizationUnits; +using LINGYUN.Abp.Saas; +using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.SettingManagement; +using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.OpenTelemetry; +using LINGYUN.Abp.Telemetry.SkyWalking; +using LINGYUN.Abp.Tencent.SettingManagement; +using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.Scriban; +using LINGYUN.Abp.WxPusher.SettingManagement; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Volo.Abp; +using Volo.Abp.AspNetCore.Authentication.JwtBearer; +using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Autofac; +using Volo.Abp.Caching.StackExchangeRedis; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; +using Volo.Abp.OpenIddict.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.OpenIddict; +using Volo.Abp.SettingManagement.EntityFrameworkCore; +using Volo.Abp.Swashbuckle; + +namespace LINGYUN.Abp.MicroService.AdminService; + +[DependsOn( + typeof(AbpCAPEventBusModule), + typeof(AbpSerilogEnrichersApplicationModule), + typeof(AbpSerilogEnrichersUniqueIdModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpLoggingSerilogElasticsearchModule), + typeof(AbpAuditLoggingElasticsearchModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule), + + // 设置管理 + typeof(AbpAliyunSettingManagementModule), + typeof(AbpTencentCloudSettingManagementModule), + // typeof(AbpWeChatSettingManagementModule), + typeof(AbpWxPusherSettingManagementModule), + typeof(AbpBlobManagementSettingManagementModule), + + typeof(AbpSettingManagementApplicationModule), + typeof(AbpSettingManagementHttpApiModule), + typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), + typeof(AbpDataProtectionManagementApplicationModule), + typeof(AbpDataProtectionManagementHttpApiModule), + typeof(AbpFeatureManagementApplicationModule), + typeof(AbpFeatureManagementHttpApiModule), + typeof(AbpFeatureManagementClientModule), + typeof(AbpAuditingApplicationModule), + typeof(AbpAuditingHttpApiModule), + typeof(AbpSaasApplicationModule), + typeof(AbpSaasHttpApiModule), + typeof(AbpSaasDbCheckerModule), + typeof(AbpTextTemplatingApplicationModule), + typeof(AbpTextTemplatingHttpApiModule), + typeof(AbpCachingManagementApplicationModule), + typeof(AbpCachingManagementHttpApiModule), + typeof(AbpCachingManagementStackExchangeRedisModule), + typeof(AbpIdentityEntityFrameworkCoreModule),// 用户角色权限需要引用包 + typeof(AbpOpenIddictEntityFrameworkCoreModule), // 客户端权限需要引用包 + typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理 + typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpPermissionManagementDomainOpenIddictModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), + // 重写模板引擎支持外部本地化 + typeof(AbpTextTemplatingScribanModule), + typeof(AdminServiceMigrationsEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), + typeof(AbpAspNetCoreAuthenticationJwtBearerModule), + typeof(AbpEmailingExceptionHandlingModule), + typeof(AbpTelemetryOpenTelemetryModule), + typeof(AbpTelemetrySkyWalkingModule), + typeof(AbpHttpClientModule), + typeof(AbpSmsPlatformModule), + typeof(AbpEmailingPlatformModule), + typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpLocalizationCultureMapModule), + typeof(AbpAspNetCoreSessionModule), + typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpDynamicDefinitionsModule), + typeof(AbpClaimsMappingModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAutofacModule) + )] +public partial class AdminServiceModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + + PreConfigureWrapper(); + PreConfigureFeature(); + PreConfigureApp(configuration); + PreConfigureCAP(configuration); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + var hostingEnvironment = context.Services.GetHostingEnvironment(); + var configuration = context.Services.GetConfiguration(); + + ConfigureWrapper(); + ConfigureLocalization(); + ConfigureBackgroundWorker(); + ConfigureExceptionHandling(); + ConfigureVirtualFileSystem(); + ConfigureTextTemplating(); + ConfigureSettingManagement(); + ConfigureFeatureManagement(); + ConfigurePermissionManagement(); + ConfigureDataProtectedManagement(); + ConfigureIdentity(configuration); + ConfigureTiming(configuration); + ConfigureCaching(configuration); + ConfigureAuditing(configuration); + ConfigureMultiTenancy(configuration); + ConfigureJsonSerializer(configuration); + ConfigureMvc(context.Services, configuration); + ConfigureCors(context.Services, configuration); + if (hostingEnvironment.IsDevelopment()) + { + ConfigureSwagger(context.Services, configuration); + } + ConfigureDistributedLocking(context.Services, configuration); + ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + app.UseForwardedHeaders(); + // 本地化 + app.UseMapRequestLocalization(); + // http调用链 + app.UseCorrelationId(); + // 文件系统 + app.MapAbpStaticAssets(); + // 路由 + app.UseRouting(); + // 跨域 + app.UseCors(); + // 认证 + app.UseAuthentication(); + app.UseJwtTokenMiddleware(); + // 多租户 + app.UseMultiTenancy(); + // jwt + app.UseDynamicClaims(); + // 授权 + app.UseAuthorization(); + if (env.IsDevelopment()) + { + // Swagger + app.UseSwagger(); + // Swagger可视化界面 + app.UseAbpSwaggerUI(options => + { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support Admin Service API"); + + var configuration = context.GetConfiguration(); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthScopes(configuration["AuthServer:Audience"]); + }); + } + // 审计日志 + app.UseAuditing(); + app.UseAbpSerilogEnrichers(); + // 路由 + app.UseConfiguredEndpoints(); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/HomeController.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/HomeController.cs new file mode 100644 index 000000000..4d97e6bad --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/HomeController.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; + +namespace LINGYUN.Abp.MicroService.AdminService.Controllers; + +public class HomeController : AbpControllerBase +{ + public ActionResult Index() + { + return Redirect("~/swagger"); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/SettingMergeController.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/SettingMergeController.cs new file mode 100644 index 000000000..877ffc1b5 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/SettingMergeController.cs @@ -0,0 +1,74 @@ +using LINGYUN.Abp.SettingManagement; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.MicroService.AdminService.Controllers; + +[ExposeServices( + typeof(SettingController), + typeof(SettingMergeController))] +public class SettingMergeController : SettingController +{ + private readonly SettingManagementMergeOptions _mergeOptions; + public SettingMergeController( + ISettingAppService settingAppService, + ISettingTestAppService settingTestAppService, + IOptions mergeOptions) + : base(settingAppService, settingTestAppService) + { + _mergeOptions = mergeOptions.Value; + } + + [HttpGet] + [Route("by-current-tenant")] + public async override Task GetAllForCurrentTenantAsync() + { + var result = new SettingGroupResult(); + var markTypeMap = new List + { + typeof(SettingMergeController), + }; + foreach (var serviceType in _mergeOptions.GlobalSettingProviders + .Where(type => !markTypeMap.Any(markType => type.IsAssignableFrom(markType)))) + { + var settingService = LazyServiceProvider.LazyGetRequiredService(serviceType).As(); + var currentResult = await settingService.GetAllForCurrentTenantAsync(); + foreach (var group in currentResult.Items) + { + result.AddGroup(group); + } + markTypeMap.Add(serviceType); + } + + return result; + } + + [HttpGet] + [Route("by-global")] + public async override Task GetAllForGlobalAsync() + { + var result = new SettingGroupResult(); + var markTypeMap = new List + { + typeof(SettingMergeController), + }; + foreach (var serviceType in _mergeOptions.GlobalSettingProviders + .Where(type => !markTypeMap.Any(markType => type.IsAssignableFrom(markType)))) + { + var settingService = LazyServiceProvider.LazyGetRequiredService(serviceType).As(); + var currentResult = await settingService.GetAllForGlobalAsync(); + foreach (var group in currentResult.Items) + { + result.AddGroup(group); + } + markTypeMap.Add(serviceType); + } + + return result; + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/UserSettingMergeController.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/UserSettingMergeController.cs new file mode 100644 index 000000000..0d0cfb9a8 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Controllers/UserSettingMergeController.cs @@ -0,0 +1,49 @@ +using LINGYUN.Abp.SettingManagement; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.MicroService.AdminService.Controllers; + +[ExposeServices( + typeof(UserSettingController), + typeof(UserSettingMergeController))] +public class UserSettingMergeController : UserSettingController +{ + private readonly SettingManagementMergeOptions _mergeOptions; + public UserSettingMergeController( + IUserSettingAppService service, + IOptions mergeOptions) + : base(service) + { + _mergeOptions = mergeOptions.Value; + } + + [HttpGet] + [Route("by-current-user")] + public async override Task GetAllForCurrentUserAsync() + { + var result = new SettingGroupResult(); + var markTypeMap = new List + { + typeof(UserSettingMergeController), + }; + foreach (var serviceType in _mergeOptions.UserSettingProviders + .Where(type => !markTypeMap.Any(markType => type.IsAssignableFrom(markType)))) + { + var settingService = LazyServiceProvider.LazyGetRequiredService(serviceType).As(); + var currentResult = await settingService.GetAllForCurrentUserAsync(); + foreach (var group in currentResult.Items) + { + result.AddGroup(group); + } + markTypeMap.Add(serviceType); + } + + return result; + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Dockerfile b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Dockerfile new file mode 100644 index 000000000..c2fe9e6b3 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Dockerfile @@ -0,0 +1,36 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +WORKDIR /src + +# copy props +COPY common.props ./ +COPY common.secrets.props ./ +COPY configureawait.props ./ +COPY Directory.Build.props ./ +COPY Directory.Packages.props ./ +COPY NuGet.Config ./ + +# copy csproj +COPY aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/ ./aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/ + +# framework +COPY aspnet-core/framework/ ./aspnet-core/framework/ + +# migrations +COPY aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/ ./aspnet-core/migrations/LINGYUN.Abp.MicroService.AdminService.EntityFrameworkCore/ + +# modules +COPY aspnet-core/modules/ ./aspnet-core/modules/ + +# dotnet restore +RUN dotnet restore aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj + +# dotnet publish +WORKDIR /src/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService +RUN dotnet publish -c Release -o /app/publish --no-restore + +# dotnet run +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final +WORKDIR /app +COPY --from=build /app/publish . + +ENTRYPOINT ["dotnet", "LINGYUN.Abp.MicroService.AdminService.dll"] \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/FodyWeavers.xml b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/FodyWeavers.xml similarity index 100% rename from aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/FodyWeavers.xml rename to aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/FodyWeavers.xml diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj new file mode 100644 index 000000000..6601f4e76 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj @@ -0,0 +1,102 @@ + + + + + + net10.0 + LINGYUN.Abp.MicroService.AdminService + Debug;Release + AnyCPU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Localization/Resources/en.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Localization/Resources/en.json similarity index 100% rename from aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Localization/Resources/en.json rename to aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Localization/Resources/en.json diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Localization/Resources/zh-Hans.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Localization/Resources/zh-Hans.json similarity index 100% rename from aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Localization/Resources/zh-Hans.json rename to aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Localization/Resources/zh-Hans.json diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Program.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Program.cs new file mode 100644 index 000000000..6581de3fa --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Program.cs @@ -0,0 +1,73 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp.IO; +using Volo.Abp.Modularity.PlugIns; + +namespace LINGYUN.Abp.MicroService.AdminService; + +public class Program +{ + public async static Task Main(string[] args) + { + try + { + Console.Title = "BackendAdmin.Host"; + Log.Information("Starting BackendAdmin.Host."); + + var builder = WebApplication.CreateBuilder(args); + builder.Host.AddAppSettingsSecretsJson() + .UseAutofac() + .ConfigureAppConfiguration((context, config) => + { + if (context.Configuration.GetValue("AgileConfig:IsEnabled", false)) + { + config.AddAgileConfig(new AgileConfig.Client.ConfigClient(context.Configuration)); + } + }) + .UseSerilog((context, provider, config) => + { + config.ReadFrom.Configuration(context.Configuration); + }); + await builder.AddApplicationAsync(options => + { + AdminServiceModule.ApplicationName = Environment.GetEnvironmentVariable("APPLICATION_NAME") + ?? AdminServiceModule.ApplicationName; + options.ApplicationName = AdminServiceModule.ApplicationName; + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(AdminServiceModule).Assembly; + // 搜索 Modules 目录下所有文件作为插件 + // 取消显示引用所有其他项目的模块,改为通过插件的形式引用 + var pluginFolder = Path.Combine( + Directory.GetCurrentDirectory(), "Modules"); + DirectoryHelper.CreateIfNotExists(pluginFolder); + options.PlugInSources.AddFolder( + pluginFolder, + SearchOption.AllDirectories); + }); + var app = builder.Build(); + await app.InitializeApplicationAsync(); + await app.RunAsync(); + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + Console.WriteLine("Host terminated unexpectedly!"); + Console.WriteLine(ex.ToString()); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Properties/launchSettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Properties/launchSettings.json new file mode 100644 index 000000000..a40aa799c --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Properties/launchSettings.json @@ -0,0 +1,21 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:65286", + "sslPort": 0 + } + }, + "profiles": { + "LINGYUN.Abp.MicroService.AdminService.HttpApi.Host": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:30010", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/AccountSettingDefinitionProvider.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/AccountSettingDefinitionProvider.cs new file mode 100644 index 000000000..301572899 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/AccountSettingDefinitionProvider.cs @@ -0,0 +1,56 @@ +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Settings; +using Volo.Abp.Localization; +using Volo.Abp.Settings; + +namespace LINGYUN.Abp.MicroService.AdminService.Settings; + +// 后台管理项目不引用 Volo.Abp.Account.Application模块,只能自建一个配置 +public class AccountSettingDefinitionProvider : SettingDefinitionProvider +{ + private const string GroupName = "Identity"; + private const int GroupOrder = 10; + public override void Define(ISettingDefinitionContext context) + { + context.Add( + new SettingDefinition( + AccountSettingNames.IsSelfRegistrationEnabled, + "true", + L("DisplayName:Abp.Account.IsSelfRegistrationEnabled"), + L("Description:Abp.Account.IsSelfRegistrationEnabled"), + isVisibleToClients: true) + .WithProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName) + .WithGroup(GroupName, L("Settings:Identity"), GroupOrder) + .WithParent("Account", L("Settings:Identity.Account"), order: 0) + .WithOrder(1) + .WithValueType(ValueType.Boolean) + ); + + context.Add( + new SettingDefinition( + AccountSettingNames.EnableLocalLogin, + "true", + L("DisplayName:Abp.Account.EnableLocalLogin"), + L("Description:Abp.Account.EnableLocalLogin"), + isVisibleToClients: true) + .WithProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName) + .WithGroup(GroupName, L("Settings:Identity"), GroupOrder) + .WithParent("Account", L("Settings:Identity.Account"), order: 0) + .WithOrder(0) + .WithValueType(ValueType.Boolean) + ); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/SystemGroupSettingDefinitionProvider.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/SystemGroupSettingDefinitionProvider.cs new file mode 100644 index 000000000..6c2f3d116 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/Settings/SystemGroupSettingDefinitionProvider.cs @@ -0,0 +1,242 @@ +using LINGYUN.Abp.SettingManagement; +using Microsoft.Extensions.Options; +using System.Linq; +using Volo.Abp; +using Volo.Abp.Emailing; +using Volo.Abp.Localization; +using Volo.Abp.SettingManagement; +using Volo.Abp.SettingManagement.Localization; +using Volo.Abp.Settings; +using Volo.Abp.Timing; +using ValueType = Volo.Abp.Settings.ValueType; + +namespace LINGYUN.Abp.MicroService.AdminService.Settings; + +public class SystemGroupSettingDefinitionProvider : SettingDefinitionProvider +{ + private const string GroupName = "System"; + + protected ITimezoneProvider TimezoneProvider { get; } + protected AbpLocalizationOptions LocalizationOptions { get; } + + public SystemGroupSettingDefinitionProvider( + ITimezoneProvider timezoneProvider, + IOptions localizationOptions) + { + TimezoneProvider = timezoneProvider; + LocalizationOptions = localizationOptions.Value; + } + + public override void Define(ISettingDefinitionContext context) + { + SetSystemSettingGroup(context); + SetEmailSettingGroup(context); + } + + private void SetSystemSettingGroup(ISettingDefinitionContext context) + { + context.GetOrNull(LocalizationSettingNames.DefaultLanguage) + ?.WithGroup(GroupName, L("Settings:System"), order: 0) + ?.WithParent("Language", L("Settings:System.Language"), order: 0) + ?.WithOrder(0) + ?.WithOptions(LocalizationOptions.Languages.Select(l => new NameValue(l.DisplayName, l.CultureName))); + + var timezoneSetting = context.GetOrNull(TimingSettingNames.TimeZone); + if (timezoneSetting != null) + { + var resourceName = LocalizationResourceNameAttribute.GetName(typeof(AbpSettingManagementResource)); + var timezones = TimeZoneHelper.GetTimezones(TimezoneProvider.GetIanaTimezones()); + + timezoneSetting + .WithGroup( + GroupName, + L("Settings:System"), + order: 0, + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.TimeZone]) + .WithParent("Timing", L("Settings:System.Timing"), order: 0) + .WithOrder(1); + timezoneSetting.WithOptions([new LocalizableValue(resourceName, "DefaultTimeZone", "Unspecified")]); + timezoneSetting.WithOptions(timezones); + } + } + + private static void SetEmailSettingGroup(ISettingDefinitionContext context) + { + context.GetOrNull(EmailSettingNames.DefaultFromAddress) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Default", + L("Settings:Emailing.Default"), + order: 0) + ?.WithOrder(0) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.DefaultFromDisplayName) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Default", + L("Settings:Emailing.Default"), + order: 0) + ?.WithOrder(1) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + + context.GetOrNull(EmailSettingNames.Smtp.Domain) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(0) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.Host) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(1) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.Port) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(2) + ?.WithValueType(ValueType.Number) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.UserName) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(3) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.Password) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(4) + ?.WithValueType(ValueType.String) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.EnableSsl) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(5) + ?.WithValueType(ValueType.Boolean) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + context.GetOrNull(EmailSettingNames.Smtp.UseDefaultCredentials) + ?.WithGroup( + "Emailing", + L("Settings:Emailing"), + order: 1, + requiredFeatures: [SettingManagementFeatures.Enable, SettingManagementFeatures.AllowChangingEmailSettings], + requiredPermissions: [Volo.Abp.SettingManagement.SettingManagementPermissions.Emailing]) + ?.WithParent( + "Smtp", + L("Settings:Emailing.Smtp"), + order: 1, + requiredPermissions: [AbpSettingManagementPermissions.Settings.Manager]) + ?.WithOrder(6) + ?.WithValueType(ValueType.Boolean) + ?.ReplaceProviders( + DefaultValueSettingValueProvider.ProviderName, + ConfigurationSettingValueProvider.ProviderName, + GlobalSettingValueProvider.ProviderName, + TenantSettingValueProvider.ProviderName); + } + + public static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} + diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/TenantHeaderParamter.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/TenantHeaderParamter.cs new file mode 100644 index 000000000..10bf975bc --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/TenantHeaderParamter.cs @@ -0,0 +1,36 @@ +using Microsoft.Extensions.Options; +using Microsoft.OpenApi; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Collections.Generic; +using Volo.Abp.AspNetCore.MultiTenancy; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Abp.MicroService.AdminService; + +public class TenantHeaderParamter : IOperationFilter +{ + private readonly AbpMultiTenancyOptions _multiTenancyOptions; + private readonly AbpAspNetCoreMultiTenancyOptions _aspNetCoreMultiTenancyOptions; + public TenantHeaderParamter( + IOptions multiTenancyOptions, + IOptions aspNetCoreMultiTenancyOptions) + { + _multiTenancyOptions = multiTenancyOptions.Value; + _aspNetCoreMultiTenancyOptions = aspNetCoreMultiTenancyOptions.Value; + } + + public void Apply(OpenApiOperation operation, OperationFilterContext context) + { + if (_multiTenancyOptions.IsEnabled) + { + operation.Parameters = operation.Parameters ?? new List(); + operation.Parameters.Add(new OpenApiParameter + { + Name = _aspNetCoreMultiTenancyOptions.TenantKey, + In = ParameterLocation.Header, + Description = "Tenant Id in http header", + Required = false + }); + } + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.Development.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.Development.json new file mode 100644 index 000000000..c0c57dd49 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.Development.json @@ -0,0 +1,145 @@ +{ + "AgileConfig": { + "IsEnabled": false, + "env": "DEV", + "appId": "LINGYUN.Abp.Backend.Admin", + "secret": "1q2w3E*", + "nodes": "http://localhost:5000", + "name": "BackendAdmin", + "tag": "BackendAdmin", + "configCacheEncrypt": true + }, + "App": { + "ShowPii": true, + "CorsOrigins": [ "http://localhost:5666" ], + "RefreshClaimsUrl": "http://localhost:30015" + }, + "Auditing": { + "AllEntitiesSelector": true + }, + "DistributedCache": { + "HideErrors": true, + "KeyPrefix": "LINGYUN.Abp.Application", + "GlobalCacheEntryOptions": { + "SlidingExpiration": "30:00:00", + "AbsoluteExpirationRelativeToNow": "60:00:00" + } + }, + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "CAP": { + "EventBus": { + "DefaultGroupName": "BackendAdmin", + "Version": "v1", + "FailedRetryInterval": 300, + "FailedRetryCount": 10, + "CollectorCleaningInterval": 3600000 + }, + "MySql": { + "TableNamePrefix": "admin", + "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "RabbitMQ": { + "HostName": "localhost", + "Port": 5672, + "UserName": "admin", + "Password": "123456", + "ExchangeName": "LINGYUN.Abp.Application", + "VirtualHost": "/" + } + }, + "DistributedLock": { + "IsEnabled": true, + "Redis": { + "Configuration": "localhost,defaultDatabase=13" + } + }, + "Redis": { + "Configuration": "localhost,defaultDatabase=10", + "InstanceName": "LINGYUN.Abp.Application" + }, + "AuthServer": { + "Authority": "http://localhost:44385/", + "Audience": "admin-service", + "ValidAudiences": [ "lingyun-abp-application" ], + "MapInboundClaims": false, + "RequireHttpsMetadata": false, + "SwaggerClientId": "vue-oauth-client" + }, + "RemoteServices": { + "Default": { + "BaseUrl": "http://localhost:30000", + "UseCurrentAccessToken": true + }, + "BlobManagement": { + "BaseUrl": "http://localhost:30025", + "UseCurrentAccessToken": true + }, + "Platform": { + "BaseUrl": "http://localhost:30025", + "UseCurrentAccessToken": true + } + }, + "Logging": { + "Serilog": { + "Elasticsearch": { + "IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}" + } + } + }, + "AuditLogging": { + "Elasticsearch": { + "IndexPrefix": "abp.dev.auditing" + } + }, + "Elasticsearch": { + "NodeUris": "http://localhost:9200" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Debug", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Debug" + } + }, + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + }, + { + "Name": "Elasticsearch", + "Args": { + "nodeUris": "http://localhost:9200", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", + "autoRegisterTemplate": true, + "autoRegisterTemplateVersion": "ESv7" + } + }, + { + "Name": "OpenTelemetry", + "Args": { + "endpoint": "http://localhost:4318", + "protocol": "HttpProtobuf", + "resourceAttributes": { + "service.name": "AdminService", + "deployment.environment": "development" + } + } + } + ] + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.json new file mode 100644 index 000000000..caf3a44e3 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AdminService/appsettings.json @@ -0,0 +1,116 @@ +{ + "App": { + "CorsOrigins": ["http://localhost:30000"] + }, + "Clock": { + "Kind": "Local" + }, + "AntiForgery": { + "AutoValidate": false + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Forwarded": { + "ForwardedHeaders": "XForwardedFor,XForwardedProto" + }, + "Json": { + "OutputDateTimeFormat": "yyyy-MM-dd HH:mm:ss", + "InputDateTimeFormats": [ + "yyyy-MM-dd HH:mm:ss", + "yyyy-MM-ddTHH:mm:ss" + ] + }, + "SkyWalking": { + "Enable": false + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + } + ] + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.Configure.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.Configure.cs new file mode 100644 index 000000000..78bddbd18 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.Configure.cs @@ -0,0 +1,514 @@ +using DotNetCore.CAP; +using LINGYUN.Abp.AspNetCore.MultiTenancy; +using LINGYUN.Abp.Identity; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.LocalizationManagement; +using LINGYUN.Abp.MicroService.AuthServer.Ui.Branding; +using LINGYUN.Abp.OpenIddict.Impersonation; +using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.Wrapper; +using Medallion.Threading; +using Medallion.Threading.Redis; +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Cors; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.Extensions.DependencyInjection; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Caching.StackExchangeRedis; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.IdentityModel.Logging; +using Microsoft.IdentityModel.Tokens; +using OpenIddict.Server; +using OpenIddict.Server.AspNetCore; +using OpenIddict.Validation.AspNetCore; +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Encodings.Web; +using System.Text.Unicode; +using Volo.Abp.Account.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling; +using Volo.Abp.Auditing; +using Volo.Abp.BlobStoring; +using Volo.Abp.Caching; +using Volo.Abp.FeatureManagement; +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Http.Client; +using Volo.Abp.Json; +using Volo.Abp.Json.SystemTextJson; +using Volo.Abp.Localization; +using Volo.Abp.MultiTenancy; +using Volo.Abp.OpenIddict; +using Volo.Abp.OpenIddict.WildcardDomains; +using Volo.Abp.PermissionManagement; +using Volo.Abp.Security.Claims; +using Volo.Abp.SettingManagement; +using Volo.Abp.Threading; +using Volo.Abp.Timing; +using Volo.Abp.UI.Navigation.Urls; +using Volo.Abp.VirtualFileSystem; + +namespace LINGYUN.Abp.MicroService.AuthServer; + +public partial class AuthServerModule +{ + public static string ApplicationName { get; set; } = "AuthServer"; + private readonly static OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + private void PreConfigureFeature() + { + OneTimeRunner.Run(() => + { + GlobalFeatureManager.Instance.Modules.Editions().EnableAll(); + }); + } + + private void PreForwardedHeaders() + { + } + + private void PreConfigureApp(IConfiguration configuration) + { + AbpSerilogEnrichersConsts.ApplicationName = ApplicationName; + + PreConfigure(options => + { + // 以开放端口区别,应在0-31之间 + options.SnowflakeIdOptions.WorkerId = 1; + options.SnowflakeIdOptions.WorkerIdBits = 5; + options.SnowflakeIdOptions.DatacenterId = 1; + }); + + if (configuration.GetValue("App:ShowPii")) + { + IdentityModelEventSource.ShowPII = true; + } + } + + private void PreConfigureCAP(IConfiguration configuration) + { + PreConfigure(options => + { + options + .UseMySql(mySqlOptions => + { + configuration.GetSection("CAP:MySql").Bind(mySqlOptions); + }) + .UseRabbitMQ(rabbitMQOptions => + { + configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions); + }) + .UseDashboard(); + }); + } + + private void PreConfigureAuthServer(IConfiguration configuration) + { + PreConfigure(builder => + { + builder.AddValidation(options => + { + var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get(); + if (validAudiences?.Length > 0) + { + options.AddAudiences(validAudiences); + } + + options.UseLocalServer(); + + options.UseAspNetCore(); + + options.UseDataProtection(); + }); + }); + } + + private void PreConfigureCertificate(IConfiguration configuration, IWebHostEnvironment environment) + { + if (!environment.IsDevelopment()) + { + PreConfigure(options => + { + options.AddDevelopmentEncryptionAndSigningCertificate = false; + }); + + PreConfigure(builder => + { + builder.AddProductionEncryptionAndSigningCertificate(configuration["App:SslFile"], configuration["App:SslPassword"]); + }); + } + + PreConfigure(builder => + { + // builder.UseDataProtection(); + + // 禁用https + builder.UseAspNetCore() + .DisableTransportSecurityRequirement(); + }); + + var wildcardDomains = configuration.GetSection("App:WildcardDomains").Get>(); + if (wildcardDomains?.Count > 0) + { + PreConfigure(options => + { + options.EnableWildcardDomainSupport = true; + options.WildcardDomainsFormat.AddIfNotContains(wildcardDomains); + }); + } + } + + private void ConfigureMvc(IServiceCollection services, IConfiguration configuration) + { + Configure(options => + { + options.ExposeIntegrationServices = true; + }); + + Configure(options => + { + options.EndpointConfigureActions.Add((builder) => + { + builder.Endpoints.MapHealthChecks(configuration["App:HealthChecks"] ?? "/healthz"); + }); + }); + + Configure(options => + { + options.StyleBundles + .Configure(LeptonXLiteThemeBundles.Styles.Global, bundle => + { + bundle.AddFiles("/css/global-styles.css"); + }); + }); + + services.AddHealthChecks(); + } + + private void ConfigureDataSeeder() + { + + } + + private void ConfigureFeatureManagement() + { + Configure(options => + { + options.SaveStaticFeaturesToDatabase = false; + options.IsDynamicFeatureStoreEnabled = true; + }); + } + + private void ConfigurePermissionManagement() + { + Configure(options => + { + options.SaveStaticPermissionsToDatabase = false; + options.IsDynamicPermissionStoreEnabled = true; + }); + } + + private void ConfigureSettingManagement() + { + Configure(options => + { + options.SaveStaticSettingsToDatabase = false; + options.IsDynamicSettingStoreEnabled = true; + }); + } + + private void ConfigureJsonSerializer(IConfiguration configuration) + { + // 统一时间日期格式 + Configure(options => + { + var jsonConfiguration = configuration.GetSection("Json"); + if (jsonConfiguration.Exists()) + { + jsonConfiguration.Bind(options); + } + }); + // 中文序列化的编码问题 + Configure(options => + { + options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + }); + } + + private void ConfigureDistributedLocking(IServiceCollection services, IConfiguration configuration) + { + var distributedLockEnabled = configuration["DistributedLock:IsEnabled"]; + if (distributedLockEnabled.IsNullOrEmpty() || bool.Parse(distributedLockEnabled)) + { + services.AddSingleton(_ => + { + return new RedisDistributedSynchronizationProvider( + ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]).GetDatabase()); + }); + } + } + + private void ConfigureBranding(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("App:Branding").Bind(options); + }); + } + + private void ConfigureBlobStoring(IConfiguration configuration) + { + Configure(options => + { + }); + } + + private void ConfigureCaching(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("DistributedCache").Bind(options); + }); + + Configure(options => + { + var redisConfig = ConfigurationOptions.Parse(options.Configuration); + options.ConfigurationOptions = redisConfig; + options.InstanceName = configuration["Redis:InstanceName"]; + }); + } + private void ConfigureIdentity(IConfiguration configuration) + { + // 增加配置文件定义,在新建租户时需要 + Configure(options => + { + var identityConfiguration = configuration.GetSection("Identity"); + if (identityConfiguration.Exists()) + { + identityConfiguration.Bind(options); + } + }); + Configure(options => + { + options.IsDynamicClaimsEnabled = true; + options.IsRemoteRefreshEnabled = false; + }); + } + private void ConfigureVirtualFileSystem() + { + Configure(options => + { + options.FileSets.AddEmbedded("LINGYUN.Abp.MicroService.AuthServer"); + }); + } + private void ConfigureLocalization() + { + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + + options.Resources + .Get() + .AddVirtualJson("/Localization/Resources"); + }); + + Configure(options => + { + var zhHansCultureMapInfo = new CultureMapInfo + { + TargetCulture = "zh-Hans", + SourceCultures = new string[] { "zh", "zh_CN", "zh-CN" } + }; + + options.CulturesMaps.Add(zhHansCultureMapInfo); + options.UiCulturesMaps.Add(zhHansCultureMapInfo); + }); + + Configure(options => + { + options.SaveStaticLocalizationsToDatabase = true; + }); + } + private void ConfigureTiming(IConfiguration configuration) + { + Configure(options => + { + configuration.GetSection("Clock").Bind(options); + }); + } + + private void ConfigureAuditing(IConfiguration configuration) + { + Configure(options => + { + // options.IsEnabledForGetRequests = true; + options.ApplicationName = ApplicationName; + // 是否启用实体变更记录 + var allEntitiesSelectorIsEnabled = configuration["Auditing:AllEntitiesSelector"]; + if (allEntitiesSelectorIsEnabled.IsNullOrWhiteSpace() || + (bool.TryParse(allEntitiesSelectorIsEnabled, out var enabled) && enabled)) + { + options.EntityHistorySelectors.AddAllEntities(); + } + }); + } + private void ConfigureUrls(IConfiguration configuration) + { + Configure(options => + { + var applicationConfiguration = configuration.GetSection("App:Urls:Applications"); + foreach (var appConfig in applicationConfiguration.GetChildren()) + { + options.Applications[appConfig.Key].RootUrl = appConfig["RootUrl"]; + foreach (var urlsConfig in appConfig.GetSection("Urls").GetChildren()) + { + options.Applications[appConfig.Key].Urls[urlsConfig.Key] = urlsConfig.Value; + } + } + }); + } + + private void ConfigureAuthServer(IConfiguration configuration) + { + Configure(builder => + { + builder.DisableTransportSecurityRequirement(); + }); + + Configure(options => + { + options.DisableTransportSecurityRequirement = true; + }); + + Configure(options => + { + var lifetime = configuration.GetSection("OpenIddict:Lifetime"); + options.AuthorizationCodeLifetime = lifetime.GetValue("AuthorizationCode", options.AuthorizationCodeLifetime); + options.AccessTokenLifetime = lifetime.GetValue("AccessToken", options.AccessTokenLifetime); + options.DeviceCodeLifetime = lifetime.GetValue("DeviceCode", options.DeviceCodeLifetime); + options.IdentityTokenLifetime = lifetime.GetValue("IdentityToken", options.IdentityTokenLifetime); + options.RefreshTokenLifetime = lifetime.GetValue("RefreshToken", options.RefreshTokenLifetime); + options.RefreshTokenReuseLeeway = lifetime.GetValue("RefreshTokenReuseLeeway", options.RefreshTokenReuseLeeway); + options.UserCodeLifetime = lifetime.GetValue("UserCode", options.UserCodeLifetime); + }); + + Configure(options => + { + options.ImpersonationPermission = IdentityPermissions.Users.Impersonation; + options.ImpersonationTenantPermission = "AbpSaas.Tenants.Impersonation"; + }); + } + private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false) + { + services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); + + services + .AddAuthentication() + .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => + { + options.ExpireTimeSpan = TimeSpan.FromDays(365); + }) + .AddJwtBearer(options => + { + configuration.GetSection("AuthServer").Bind(options); + + var validIssuers = configuration.GetSection("AuthServer:ValidIssuers").Get>(); + var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get>(); + if (validIssuers?.Count > 0) + { + options.TokenValidationParameters.ValidIssuers = validIssuers; + options.TokenValidationParameters.IssuerValidator = TokenWildcardIssuerValidator.IssuerValidator; + } + if (validAudiences?.Count > 0) + { + options.TokenValidationParameters.ValidAudiences = validAudiences; + } + }); + //.AddWeChatWork(options => + //{ + // options.SignInScheme = IdentityConstants.ExternalScheme; + //}); + + services.AddDataProtection() + .SetApplicationName("LINGYUN.Abp.Application") + .PersistKeysToStackExchangeRedis(() => + { + return ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]).GetDatabase(); + }, + "LINGYUN.Abp.Application:DataProtection:Protection-Keys"); + + services.AddSameSiteCookiePolicy(); + } + private void ConfigureMultiTenancy(IConfiguration configuration) + { + // 多租户 + Configure(options => + { + options.IsEnabled = true; + }); + + var tenantResolveCfg = configuration.GetSection("App:Domains"); + if (tenantResolveCfg.Exists()) + { + Configure(options => + { + var domains = tenantResolveCfg.Get(); + foreach (var domain in domains) + { + options.AddOnlyDomainTenantResolver(domain); + } + }); + } + } + private void ConfigureCors(IServiceCollection services, IConfiguration configuration) + { + services.AddCors(options => + { + options.AddDefaultPolicy(builder => + { + var corsOrigins = configuration.GetSection("App:CorsOrigins").Get>(); + if (corsOrigins == null || corsOrigins.Count == 0) + { + corsOrigins = configuration["App:CorsOrigins"]? + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToList() ?? new List(); + } + builder + .WithOrigins(corsOrigins + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .WithAbpWrapExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + private void PreConfigureWrapper() + { + PreConfigure(options => + { + // http服务间调用发送不需要包装结果的请求头 + options.ProxyClientActions.Add( + (_, _, client) => + { + client.DefaultRequestHeaders.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true"); + }); + }); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.cs new file mode 100644 index 000000000..1008f500a --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/AuthServerModule.cs @@ -0,0 +1,174 @@ +using LINGYUN.Abp.Account; +using LINGYUN.Abp.Account.Web.AliyunCaptcha; +using LINGYUN.Abp.Account.Web.LazyCaptcha; +using LINGYUN.Abp.Account.Web.OAuth; +using LINGYUN.Abp.Account.Web.OpenIddict; +using LINGYUN.Abp.Account.Web.TencentCaptcha; +using LINGYUN.Abp.AspNetCore.HttpOverrides; +using LINGYUN.Abp.AspNetCore.MultiTenancy; +using LINGYUN.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; +using LINGYUN.Abp.AspNetCore.Session; +using LINGYUN.Abp.AuditLogging.Elasticsearch; +using LINGYUN.Abp.BlobStoring.BlobManagement; +using LINGYUN.Abp.Data.DbMigrator; +using LINGYUN.Abp.Dynamic.Definitions; +using LINGYUN.Abp.Emailing.Platform; +using LINGYUN.Abp.EventBus.CAP; +using LINGYUN.Abp.Exporter.MiniSoftware; +using LINGYUN.Abp.Gdpr; +using LINGYUN.Abp.Gdpr.Web; +using LINGYUN.Abp.Identity.AspNetCore; +using LINGYUN.Abp.Identity.OrganizaztionUnits; +using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore; +using LINGYUN.Abp.OpenIddict.Impersonation; +using LINGYUN.Abp.OpenIddict.LinkUser; +using LINGYUN.Abp.OpenIddict.Portal; +using LINGYUN.Abp.OpenIddict.Sms; +using LINGYUN.Abp.OpenIddict.WeChat; +using LINGYUN.Abp.OpenIddict.WeChat.Work; +using LINGYUN.Abp.Serilog.Enrichers.Application; +using LINGYUN.Abp.Serilog.Enrichers.UniqueId; +using LINGYUN.Abp.Sms.Platform; +using LINGYUN.Abp.Telemetry.OpenTelemetry; +using LINGYUN.Abp.Telemetry.SkyWalking; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Volo.Abp; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Autofac; +using Volo.Abp.Caching.StackExchangeRedis; +using Volo.Abp.Http.Client.IdentityModel.Web; +using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement.Identity; + +namespace LINGYUN.Abp.MicroService.AuthServer; + +[DependsOn( + typeof(AbpSerilogEnrichersApplicationModule), + typeof(AbpSerilogEnrichersUniqueIdModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), + // 使用 LazyCaptcha 验证码组件 + typeof(AbpAccountWebLazyCaptchaModule), + // 使用 腾讯云验证码组件, 需配置好腾讯云相关参数 + typeof(AbpAccountWebTencentCaptchaModule), + // 使用 阿里云验证码组件, 需配置好阿里云相关参数 + typeof(AbpAccountWebAliyunCaptchaModule), + typeof(AbpAccountWebOpenIddictModule), + typeof(AbpAccountWebOAuthModule), + typeof(AbpBlobStoringBlobManagementModule), + typeof(AbpGdprApplicationModule), + typeof(AbpGdprHttpApiModule), + typeof(AbpGdprWebModule), + typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), + typeof(AbpAutofacModule), + typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpIdentityAspNetCoreModule), + typeof(AbpOpenIddictSmsModule), + typeof(AbpOpenIddictWeChatModule), + typeof(AbpOpenIddictLinkUserModule), + typeof(AbpOpenIddictPortalModule), + typeof(AbpOpenIddictWeChatWorkModule), + typeof(AbpOpenIddictImpersonationModule), + typeof(AbpIdentityOrganizaztionUnitsModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AuthServerMigrationsEntityFrameworkCoreModule), + typeof(AbpDataDbMigratorModule), + typeof(AbpAuditLoggingElasticsearchModule), // 放在 AbpIdentity 模块之后,避免被覆盖 + typeof(AbpLocalizationCultureMapModule), + typeof(AbpAspNetCoreSessionModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule), + typeof(AbpAspNetCoreMultiTenancyModule), + typeof(AbpAspNetCoreMvcWrapperModule), + typeof(AbpAspNetCoreHttpOverridesModule), + typeof(AbpDynamicDefinitionsModule), + typeof(AbpHttpClientIdentityModelWebModule), + typeof(AbpTelemetryOpenTelemetryModule), + typeof(AbpTelemetrySkyWalkingModule), + typeof(AbpExporterMiniSoftwareModule), + typeof(AbpEmailingPlatformModule), + typeof(AbpSmsPlatformModule), + typeof(AbpCAPEventBusModule) + )] +public partial class AuthServerModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + var hostingEnvironment = context.Services.GetHostingEnvironment(); + + PreConfigureWrapper(); + PreConfigureFeature(); + PreForwardedHeaders(); + PreConfigureApp(configuration); + PreConfigureCAP(configuration); + PreConfigureAuthServer(configuration); + PreConfigureCertificate(configuration, hostingEnvironment); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + var hostingEnvironment = context.Services.GetHostingEnvironment(); + var configuration = context.Services.GetConfiguration(); + + ConfigureBranding(configuration); + ConfigureBlobStoring(configuration); + ConfigureCaching(configuration); + ConfigureIdentity(configuration); + ConfigureVirtualFileSystem(); + ConfigureFeatureManagement(); + ConfigureSettingManagement(); + ConfigurePermissionManagement(); + ConfigureLocalization(); + ConfigureDataSeeder(); + ConfigureUrls(configuration); + ConfigureTiming(configuration); + ConfigureAuditing(configuration); + ConfigureAuthServer(configuration); + ConfigureMultiTenancy(configuration); + ConfigureJsonSerializer(configuration); + ConfigureMvc(context.Services, configuration); + ConfigureCors(context.Services, configuration); + ConfigureDistributedLocking(context.Services, configuration); + ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + app.UseForwardedHeaders(); + app.UseMapRequestLocalization(); + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + // app.UseErrorPage(); + app.UseHsts(); + } + // app.UseHttpsRedirection(); + app.UseCookiePolicy(); + app.UseCorrelationId(); + app.MapAbpStaticAssets(); + app.UseRouting(); + app.UseCors(); + app.UseAuthentication(); + app.UseAbpOpenIddictValidation(); + app.UseMultiTenancy(); + app.UseUnitOfWork(); + app.UseDynamicClaims(); + app.UseAuthorization(); + app.UseAuditing(); + app.UseAbpSerilogEnrichers(); + app.UseConfiguredEndpoints(); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Dockerfile b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Dockerfile new file mode 100644 index 000000000..11b3d7e35 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Dockerfile @@ -0,0 +1,36 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +WORKDIR /src + +# copy props +COPY common.props ./ +COPY common.secrets.props ./ +COPY configureawait.props ./ +COPY Directory.Build.props ./ +COPY Directory.Packages.props ./ +COPY NuGet.Config ./ + +# copy csproj +COPY aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/ ./aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/ + +# framework +COPY aspnet-core/framework/ ./aspnet-core/framework/ + +# migrations +COPY aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/ ./aspnet-core/migrations/LINGYUN.Abp.MicroService.AuthServer.EntityFrameworkCore/ + +# modules +COPY aspnet-core/modules/ ./aspnet-core/modules/ + +# dotnet restore +RUN dotnet restore aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/LINGYUN.Abp.MicroService.AuthServer.csproj + +# dotnet publish +WORKDIR /src/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer +RUN dotnet publish -c Release -o /app/publish --no-restore + +# dotnet run +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final +WORKDIR /app +COPY --from=build /app/publish . + +ENTRYPOINT ["dotnet", "LINGYUN.Abp.MicroService.AuthServer.dll"] \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/LINGYUN.Abp.MicroService.AuthServer.csproj b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/LINGYUN.Abp.MicroService.AuthServer.csproj new file mode 100644 index 000000000..4e99febd0 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/LINGYUN.Abp.MicroService.AuthServer.csproj @@ -0,0 +1,93 @@ + + + + + + net10.0 + LINGYUN.Abp.MicroService.AuthServer + Debug;Release + AnyCPU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Localization/Resources/en.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Localization/Resources/en.json similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/Localization/Resources/en.json rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Localization/Resources/en.json diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Localization/Resources/zh-Hans.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Localization/Resources/zh-Hans.json new file mode 100644 index 000000000..a8c07a8ef --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Localization/Resources/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hans", + "texts": { + "AuthenticationScheme:QQ Connect": "QQ", + "AuthenticationScheme:WeChat": "微信" + } +} \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Microsoft/Extensions/DependencyInjection/SameSiteCookiesServiceCollectionExtensions.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Microsoft/Extensions/DependencyInjection/SameSiteCookiesServiceCollectionExtensions.cs new file mode 100644 index 000000000..3b0c754a5 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Microsoft/Extensions/DependencyInjection/SameSiteCookiesServiceCollectionExtensions.cs @@ -0,0 +1,70 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; + +namespace Microsoft.Extensions.DependencyInjection +{ + public static class SameSiteCookiesServiceCollectionExtensions + { + public static IServiceCollection AddSameSiteCookiePolicy(this IServiceCollection services) + { + services.Configure(options => + { + options.MinimumSameSitePolicy = SameSiteMode.Unspecified; + options.OnAppendCookie = cookieContext => + CheckSameSite(cookieContext.Context, cookieContext.CookieOptions); + options.OnDeleteCookie = cookieContext => + CheckSameSite(cookieContext.Context, cookieContext.CookieOptions); + }); + + return services; + } + + private static void CheckSameSite(HttpContext httpContext, CookieOptions options) + { + if (options.SameSite == SameSiteMode.None) + { + var userAgent = httpContext.Request.Headers["User-Agent"].ToString(); + if (!httpContext.Request.IsHttps || DisallowsSameSiteNone(userAgent)) + { + // For .NET Core < 3.1 set SameSite = (SameSiteMode)(-1) + options.SameSite = SameSiteMode.Unspecified; + } + } + } + + private static bool DisallowsSameSiteNone(string userAgent) + { + // Cover all iOS based browsers here. This includes: + // - Safari on iOS 12 for iPhone, iPod Touch, iPad + // - WkWebview on iOS 12 for iPhone, iPod Touch, iPad + // - Chrome on iOS 12 for iPhone, iPod Touch, iPad + // All of which are broken by SameSite=None, because they use the iOS networking stack + if (userAgent.Contains("CPU iPhone OS 12") || userAgent.Contains("iPad; CPU OS 12")) + { + return true; + } + + // Cover Mac OS X based browsers that use the Mac OS networking stack. This includes: + // - Safari on Mac OS X. + // This does not include: + // - Chrome on Mac OS X + // Because they do not use the Mac OS networking stack. + if (userAgent.Contains("Macintosh; Intel Mac OS X 10_14") && + userAgent.Contains("Version/") && userAgent.Contains("Safari")) + { + return true; + } + + // Cover Chrome 50-69, because some versions are broken by SameSite=None, + // and none in this range require it. + // Note: this covers some pre-Chromium Edge versions, + // but pre-Chromium Edge does not require SameSite=None. + if (userAgent.Contains("Chrome/5") || userAgent.Contains("Chrome/6")) + { + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/MultiTenancy/PaltformAvailableTenantPickerStore.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/MultiTenancy/PaltformAvailableTenantPickerStore.cs new file mode 100644 index 000000000..ba022ab31 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/MultiTenancy/PaltformAvailableTenantPickerStore.cs @@ -0,0 +1,28 @@ +using LINGYUN.Abp.AspNetCore.Mvc.UI.MultiTenancy; +using LINGYUN.Platform.Portal; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.DependencyInjection; + +namespace LINGYUN.Abp.MicroService.AuthServer.MultiTenancy; + +[Dependency(ReplaceServices = true)] +public class PaltformAvailableTenantPickerStore : IAvailableTenantPickerStore, ITransientDependency +{ + private readonly IEnterpriseRepository _enterpriseRepository; + public PaltformAvailableTenantPickerStore(IEnterpriseRepository enterpriseRepository) + { + _enterpriseRepository = enterpriseRepository; + } + + public async virtual Task>> GetAvailableTenantsAsync() + { + var enterprises = await _enterpriseRepository.GetEnterprisesInTenantListAsync(maxResultCount: 25); + + return enterprises + .Select(enterprise => new NameValue(enterprise.Name, enterprise.TenantId?.ToString())) + .ToList(); + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml new file mode 100644 index 000000000..e7d74e8c0 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml @@ -0,0 +1,34 @@ +@page +@using LINGYUN.Abp.MicroService.AuthServer.Pages +@using Volo.Abp.Users +@model IndexModel +@inject ICurrentUser CurrentUser +@if (CurrentUser.IsAuthenticated) +{ +
+ + + + Logout + + +

@CurrentUser.UserName

+
@CurrentUser.Email
+
+ Roles: @CurrentUser.Roles.JoinAsString(", ") +
+ Claims:
+ @Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString("
")) +
+
+
+
+} + +@if (!CurrentUser.IsAuthenticated) +{ +
+

+ Login +
+} \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml.cs new file mode 100644 index 000000000..b96b2a1c7 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/Index.cshtml.cs @@ -0,0 +1,10 @@ +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace LINGYUN.Abp.MicroService.AuthServer.Pages; + +public class IndexModel : AbpPageModel +{ + public void OnGet() + { + } +} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/_ViewImports.cshtml b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/_ViewImports.cshtml similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/Pages/_ViewImports.cshtml rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Pages/_ViewImports.cshtml diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Program.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Program.cs new file mode 100644 index 000000000..e4b149ea7 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Program.cs @@ -0,0 +1,74 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp.IO; +using Volo.Abp.Modularity.PlugIns; + +namespace LINGYUN.Abp.MicroService.AuthServer; + +public class Program +{ + public async static Task Main(string[] args) + { + try + { + Console.Title = "AuthServer"; + Log.Information("Starting AuthServer."); + + var builder = WebApplication.CreateBuilder(args); + builder.Host.AddAppSettingsSecretsJson() + .UseAutofac() + .ConfigureAppConfiguration((context, config) => + { + if (context.Configuration.GetValue("AgileConfig:IsEnabled", false)) + { + config.AddAgileConfig(new AgileConfig.Client.ConfigClient(context.Configuration)); + } + }) + .UseSerilog((context, provider, config) => + { + config.ReadFrom.Configuration(context.Configuration); + }); + await builder.AddApplicationAsync(options => + { + AuthServerModule.ApplicationName = Environment.GetEnvironmentVariable("APPLICATION_NAME") + ?? AuthServerModule.ApplicationName; + options.ApplicationName = AuthServerModule.ApplicationName; + // 从环境变量取用户机密配置, 适用于容器测试 + options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); + // 如果容器没有指定用户机密, 从项目读取 + options.Configuration.UserSecretsAssembly = typeof(AuthServerModule).Assembly; + // 搜索 Modules 目录下所有文件作为插件 + // 取消显示引用所有其他项目的模块,改为通过插件的形式引用 + var pluginFolder = Path.Combine( + Directory.GetCurrentDirectory(), "Modules"); + DirectoryHelper.CreateIfNotExists(pluginFolder); + options.PlugInSources.AddFolder( + pluginFolder, + SearchOption.AllDirectories); + }); + var app = builder.Build(); + await app.InitializeApplicationAsync(); + await app.RunAsync(); + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + Console.WriteLine("Host terminated unexpectedly!"); + Console.WriteLine(ex.ToString()); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } +} + diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Properties/launchSettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Properties/launchSettings.json new file mode 100644 index 000000000..a8e369772 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "LINGYUN.Abp.MicroService.AuthServer": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:44385;https://localhost:44386" + } + } +} \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs new file mode 100644 index 000000000..0f0c24934 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs @@ -0,0 +1,10 @@ +namespace LINGYUN.Abp.MicroService.AuthServer.Ui.Branding; + +public class AccountBrandingOptions +{ + public string AppName { get; set; } + + public string LogoUrl { get; set; } + + public string LogoReverseUrl { get; set; } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs new file mode 100644 index 000000000..ebc06c8d1 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.Options; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Ui.Branding; + +namespace LINGYUN.Abp.MicroService.AuthServer.Ui.Branding; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IBrandingProvider), typeof(AccountBrandingProvider))] +public class AccountBrandingProvider : IBrandingProvider, ITransientDependency +{ + private readonly AccountBrandingOptions _options; + + public AccountBrandingProvider(IOptions options) + { + _options = options.Value; + } + + public string AppName => _options.AppName ?? "MyApplication"; + + public string LogoUrl => _options.LogoUrl; + + public string LogoReverseUrl => _options.LogoReverseUrl; +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/abp.resourcemapping.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/abp.resourcemapping.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/abp.resourcemapping.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/abp.resourcemapping.js diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.Development.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.Development.json new file mode 100644 index 000000000..2cca50d92 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.Development.json @@ -0,0 +1,229 @@ +{ + "AgileConfig": { + "IsEnabled": false, + "env": "DEV", + "appId": "LINGYUN.Abp.AuthServer", + "secret": "1q2w3E*", + "nodes": "http://localhost:15000", + "name": "AuthServer", + "tag": "AuthServer", + "configCacheEncrypt": true + }, + "App": { + "CorsOrigins": [ + "http://localhost:5666", + "http://localhost:30000", + "http://localhost:30010", + "http://localhost:30015", + "http://localhost:30020", + "http://localhost:30025", + "http://localhost:30030", + "http://localhost:30040", + "http://localhost:30045", + "http://localhost:30050", + "http://localhost:30060" + ], + "Urls": { + "Applications": { + "MVC": { + "RootUrl": "http://localhost:44385/", + "Urls": { + "Abp.Account.EmailConfirm": "Account/EmailConfirm", + "Abp.Account.EmailVerifyLogin": "Account/VerifyCode" + } + }, + "STS": { + "RootUrl": "http://localhost:44385/" + }, + "VueVbenAdmin": { + "RootUrl": "http://localhost:5666/", + "Urls": { + "Abp.Account.EmailConfirm": "account/email-confirm", + "Abp.Account.EmailVerifyLogin": "account/verify-code" + } + } + } + } + }, + "Auditing": { + "AllEntitiesSelector": true + }, + "DistributedCache": { + "HideErrors": true, + "KeyPrefix": "LINGYUN.Abp.Application", + "GlobalCacheEntryOptions": { + "SlidingExpiration": "30:00:00", + "AbsoluteExpirationRelativeToNow": "60:00:00" + } + }, + "ConnectionStrings": { + "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "CAP": { + "EventBus": { + "DefaultGroupName": "AuthServer", + "Version": "v1", + "FailedRetryInterval": 300, + "FailedRetryCount": 10, + "CollectorCleaningInterval": 3600000 + }, + "MySql": { + "TableNamePrefix": "auth", + "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" + }, + "RabbitMQ": { + "HostName": "localhost", + "Port": 5672, + "UserName": "admin", + "Password": "123456", + "ExchangeName": "LINGYUN.Abp.Application", + "VirtualHost": "/" + } + }, + "DistributedLock": { + "IsEnabled": true, + "Redis": { + "Configuration": "localhost,defaultDatabase=13" + } + }, + "Redis": { + "Configuration": "localhost,defaultDatabase=10", + "InstanceName": "LINGYUN.Abp.Application" + }, + "RemoteServices": { + "Default": { + "BaseUrl": "http://localhost:30000", + "UseCurrentAccessToken": true + }, + "BlobManagement": { + "BaseUrl": "http://localhost:30025", + "UseCurrentAccessToken": true + }, + "Platform": { + "BaseUrl": "http://localhost:30025", + "UseCurrentAccessToken": true + } + }, + "AuthServer": { + "Authority": "http://localhost:44385/", + "Audience": "auth-server", + "ValidAudiences": [ + "api-gateway", + "auth-server", + "admin-service", + "ai-service", + "identity-service", + "localization-service", + "message-service", + "platform-service", + "task-service", + "webhook-service", + "wechat-service", + "workflow-service", + "lingyun-abp-application" + ], + "MapInboundClaims": false, + "RequireHttpsMetadata": false + }, + "OpenIddict": { + "Applications": { + "VueAdmin": { + "ClientId": "vue-admin-client", + "ClientSecret": "1q2w3e*", + "RootUrl": "http://localhost:5666/" + }, + "InternalService": { + "ClientId": "InternalServiceClient", + "ClientSecret": "1q2w3e*" + }, + "VueOAuthClient": { + "ClientId": "vue-oauth-client", + "RootUrls": [ + "http://localhost:5666", + "http://localhost:30010", + "http://localhost:30015", + "http://localhost:30020", + "http://localhost:30025", + "http://localhost:30030", + "http://localhost:30040", + "http://localhost:30045", + "http://localhost:30050", + "http://localhost:30060" + ] + } + } + }, + "Identity": { + "Password": { + "RequiredLength": 6, + "RequiredUniqueChars": 0, + "RequireNonAlphanumeric": false, + "RequireLowercase": false, + "RequireUppercase": false, + "RequireDigit": false + }, + "Lockout": { + "AllowedForNewUsers": false, + "LockoutDuration": 5, + "MaxFailedAccessAttempts": 5 + }, + "SignIn": { + "RequireConfirmedEmail": false, + "RequireConfirmedPhoneNumber": false + } + }, + "AuditLogging": { + "Elasticsearch": { + "IndexPrefix": "abp.dev.auditing" + } + }, + "Elasticsearch": { + "NodeUris": "http://localhost:9200" + }, + "Serilog": { + "MinimumLevel": { + "Default": "Warning", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + }, + { + "Name": "Elasticsearch", + "Args": { + "nodeUris": "http://localhost:9200", + "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", + "autoRegisterTemplate": true, + "autoRegisterTemplateVersion": "ESv7" + } + }, + { + "Name": "OpenTelemetry", + "Args": { + "endpoint": "http://localhost:4318", + "protocol": "HttpProtobuf", + "resourceAttributes": { + "service.name": "AuthServer", + "deployment.environment": "development" + } + } + } + ] + } +} diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.json new file mode 100644 index 000000000..e89efa5d0 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/appsettings.json @@ -0,0 +1,116 @@ +{ + "App": { + "Branding": { + "AppName": "Auth Server" + }, + "SslFile": "openiddict.pfx", + "SslPassword": "e1c48393-0c43-11f0-9582-4aecacda42db" + }, + "Clock": { + "Kind": "Local" + }, + "Forwarded": { + "ForwardedHeaders": "XForwardedFor,XForwardedProto" + }, + "StringEncryption": { + "DefaultPassPhrase": "s46c5q55nxpeS8Ra", + "InitVectorBytes": "s83ng0abvd02js84", + "DefaultSalt": "sf&5)s3#" + }, + "Json": { + "InputDateTimeFormats": [ + "yyyy-MM-dd HH:mm:ss", + "yyyy-MM-ddTHH:mm:ss" + ] + }, + "SkyWalking": { + "Enable": false + }, + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" + } + }, + "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], + "WriteTo": [ + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "Console", + "Args": { + "restrictedToMinimumLevel": "Debug", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Debug-.log", + "restrictedToMinimumLevel": "Debug", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Info-.log", + "restrictedToMinimumLevel": "Information", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Warn-.log", + "restrictedToMinimumLevel": "Warning", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Error-.log", + "restrictedToMinimumLevel": "Error", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "Logs/Fatal-.log", + "restrictedToMinimumLevel": "Fatal", + "rollingInterval": "Day", + "rollOnFileSizeLimit": true, + "retainedFileCountLimit": 50, + "fileSizeLimitBytes": 5242880, + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" + } + } + ] + } + } + ] + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/openiddict.pfx similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/openiddict.pfx diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/package.json b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/package.json new file mode 100644 index 000000000..1840aa5cf --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/package.json @@ -0,0 +1,9 @@ +{ + "version": "10.6.0", + "name": "my-app-authserver", + "private": true, + "dependencies": { + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "5.6.0", + "@abp/qrcode": "10.6.0" + } +} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/css/global-styles.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/css/global-styles.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/css/global-styles.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/all.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/css/v4-shims.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/@popperjs/popper.min.js.map diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css new file mode 100644 index 000000000..ddf9cae5b --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css @@ -0,0 +1,56 @@ +@keyframes spin { + 0% { + transform: translateZ(0) rotate(0deg); + } + + 100% { + transform: translateZ(0) rotate(360deg); + } +} + +.abp-block-area { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 102; + background-color: #fff; + opacity: .8; + transition: opacity .25s; +} + + .abp-block-area.abp-block-area-disappearing { + opacity: 0; + } + + .abp-block-area.abp-block-area-busy:after { + content: attr(data-text); + display: block; + max-width: 125px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 20px; + font-family: sans-serif; + color: #343a40; + text-align: center; + text-transform: uppercase; + } + + .abp-block-area.abp-block-area-busy:before { + content: ""; + display: block; + width: 150px; + height: 150px; + border-radius: 50%; + border-width: 2px; + border-style: solid; + border-color: transparent #228ae6 #228ae6 #228ae6; + position: absolute; + top: calc(50% - 75px); + left: calc(50% - 75px); + will-change: transform; + animation: spin .75s infinite ease-in-out; + } diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js new file mode 100644 index 000000000..5ad66cabd --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js @@ -0,0 +1,882 @@ +var abp = abp || {}; +(function () { + + /* Application paths *****************************************/ + + //Current application root path (including virtual directory if exists). + var baseElement = document.querySelector('base'); + var baseHref = baseElement ? baseElement.getAttribute('href') : null; + abp.appPath = baseHref || abp.appPath || '/'; + + abp.pageLoadTime = new Date(); + + //Converts given path to absolute path using abp.appPath variable. + abp.toAbsAppPath = function (path) { + if (path.indexOf('/') == 0) { + path = path.substring(1); + } + + return abp.appPath + path; + }; + + /* LOGGING ***************************************************/ + //Implements Logging API that provides secure & controlled usage of console.log + + abp.log = abp.log || {}; + + abp.log.levels = { + DEBUG: 1, + INFO: 2, + WARN: 3, + ERROR: 4, + FATAL: 5 + }; + + abp.log.level = abp.log.levels.DEBUG; + + abp.log.log = function (logObject, logLevel) { + if (!window.console || !window.console.log) { + return; + } + + if (logLevel != undefined && logLevel < abp.log.level) { + return; + } + + console.log(logObject); + }; + + abp.log.debug = function (logObject) { + abp.log.log("DEBUG: ", abp.log.levels.DEBUG); + abp.log.log(logObject, abp.log.levels.DEBUG); + }; + + abp.log.info = function (logObject) { + abp.log.log("INFO: ", abp.log.levels.INFO); + abp.log.log(logObject, abp.log.levels.INFO); + }; + + abp.log.warn = function (logObject) { + abp.log.log("WARN: ", abp.log.levels.WARN); + abp.log.log(logObject, abp.log.levels.WARN); + }; + + abp.log.error = function (logObject) { + abp.log.log("ERROR: ", abp.log.levels.ERROR); + abp.log.log(logObject, abp.log.levels.ERROR); + }; + + abp.log.fatal = function (logObject) { + abp.log.log("FATAL: ", abp.log.levels.FATAL); + abp.log.log(logObject, abp.log.levels.FATAL); + }; + + /* LOCALIZATION ***********************************************/ + + abp.localization = abp.localization || {}; + abp.localization.internal = abp.localization.internal || {}; + abp.localization.values = abp.localization.values || {}; + abp.localization.resources = abp.localization.resources || {}; + + abp.localization.internal.getResource = function (resourceName) { + var resource = abp.localization.resources[resourceName]; + if (resource) { + return resource; + } + + var legacySource = abp.localization.values[resourceName]; + if (legacySource) { + return { + texts: abp.localization.values[resourceName], + baseResources: [] + }; + } + + abp.log.warn('Could not find localization source: ' + resourceName); + return null; + }; + + abp.localization.internal.localize = function (key, sourceName) { + var resource = abp.localization.internal.getResource(sourceName); + if (!resource){ + return { + value: key, + found: false + }; + } + + var value = resource.texts[key]; + if (value === undefined) { + for (var i = 0; i < resource.baseResources.length; i++){ + var basedArguments = Array.prototype.slice.call(arguments, 0); + basedArguments[1] = resource.baseResources[i]; + + var result = abp.localization.internal.localize.apply(this, basedArguments); + if (result.found){ + return result; + } + } + + return { + value: key, + found: false + }; + } + + var copiedArguments = Array.prototype.slice.call(arguments, 0); + copiedArguments.splice(1, 1); + copiedArguments[0] = value; + + return { + value: abp.utils.formatString.apply(this, copiedArguments), + found: true + }; + }; + + abp.localization.localize = function (key, sourceName) { + if (sourceName === '_') { //A convention to suppress the localization + return key; + } + + if (sourceName) { + return abp.localization.internal.localize.apply(this, arguments).value; + } + + if (!abp.localization.defaultResourceName) { + abp.log.warn('Localization source name is not specified and the defaultResourceName was not defined!'); + return key; + } + + var copiedArguments = Array.prototype.slice.call(arguments, 0); + copiedArguments.splice(1, 1, abp.localization.defaultResourceName); + + return abp.localization.internal.localize.apply(this, copiedArguments).value; + }; + + abp.localization.isLocalized = function (key, sourceName) { + if (sourceName === '_') { //A convention to suppress the localization + return true; + } + + sourceName = sourceName || abp.localization.defaultResourceName; + if (!sourceName) { + return false; + } + + return abp.localization.internal.localize(key, sourceName).found; + }; + + abp.localization.getResource = function (name) { + return function () { + var copiedArguments = Array.prototype.slice.call(arguments, 0); + copiedArguments.splice(1, 0, name); + return abp.localization.localize.apply(this, copiedArguments); + }; + }; + + abp.localization.defaultResourceName = undefined; + abp.localization.currentCulture = { + cultureName: undefined + }; + + var getMapValue = function (packageMaps, packageName, language) { + language = language || abp.localization.currentCulture.name; + if (!packageMaps || !packageName || !language) { + return language; + } + + var packageMap = packageMaps[packageName]; + if (!packageMap) { + return language; + } + + for (var i = 0; i < packageMap.length; i++) { + var map = packageMap[i]; + if (map.name === language){ + return map.value; + } + } + + return language; + }; + + abp.localization.getLanguagesMap = function (packageName, language) { + return getMapValue(abp.localization.languagesMap, packageName, language); + }; + + abp.localization.getLanguageFilesMap = function (packageName, language) { + return getMapValue(abp.localization.languageFilesMap, packageName, language); + }; + + /* AUTHORIZATION **********************************************/ + + abp.auth = abp.auth || {}; + + abp.auth.grantedPolicies = abp.auth.grantedPolicies || {}; + + abp.auth.isGranted = function (policyName) { + return abp.auth.grantedPolicies[policyName] != undefined; + }; + + abp.auth.isAnyGranted = function () { + if (!arguments || arguments.length <= 0) { + return true; + } + + for (var i = 0; i < arguments.length; i++) { + if (abp.auth.isGranted(arguments[i])) { + return true; + } + } + + return false; + }; + + abp.auth.areAllGranted = function () { + if (!arguments || arguments.length <= 0) { + return true; + } + + for (var i = 0; i < arguments.length; i++) { + if (!abp.auth.isGranted(arguments[i])) { + return false; + } + } + + return true; + }; + + abp.auth.tokenCookieName = 'Abp.AuthToken'; + + abp.auth.setToken = function (authToken, expireDate) { + abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain); + }; + + abp.auth.getToken = function () { + return abp.utils.getCookieValue(abp.auth.tokenCookieName); + } + + abp.auth.clearToken = function () { + abp.auth.setToken(); + } + + /* SETTINGS *************************************************/ + + abp.setting = abp.setting || {}; + + abp.setting.values = abp.setting.values || {}; + + abp.setting.get = function (name) { + return abp.setting.values[name]; + }; + + abp.setting.getBoolean = function (name) { + var value = abp.setting.get(name); + return value == 'true' || value == 'True'; + }; + + abp.setting.getInt = function (name) { + return parseInt(abp.setting.values[name]); + }; + + /* NOTIFICATION *********************************************/ + //Defines Notification API, not implements it + + abp.notify = abp.notify || {}; + + abp.notify.success = function (message, title, options) { + abp.log.warn('abp.notify.success is not implemented!'); + }; + + abp.notify.info = function (message, title, options) { + abp.log.warn('abp.notify.info is not implemented!'); + }; + + abp.notify.warn = function (message, title, options) { + abp.log.warn('abp.notify.warn is not implemented!'); + }; + + abp.notify.error = function (message, title, options) { + abp.log.warn('abp.notify.error is not implemented!'); + }; + + /* MESSAGE **************************************************/ + //Defines Message API, not implements it + + abp.message = abp.message || {}; + + abp.message._showMessage = function (message, title) { + alert((title || '') + ' ' + message); + }; + + abp.message.info = function (message, title) { + abp.log.warn('abp.message.info is not implemented!'); + return abp.message._showMessage(message, title); + }; + + abp.message.success = function (message, title) { + abp.log.warn('abp.message.success is not implemented!'); + return abp.message._showMessage(message, title); + }; + + abp.message.warn = function (message, title) { + abp.log.warn('abp.message.warn is not implemented!'); + return abp.message._showMessage(message, title); + }; + + abp.message.error = function (message, title) { + abp.log.warn('abp.message.error is not implemented!'); + return abp.message._showMessage(message, title); + }; + + abp.message.confirm = function (message, titleOrCallback, callback) { + abp.log.warn('abp.message.confirm is not properly implemented!'); + + if (titleOrCallback && !(typeof titleOrCallback == 'string')) { + callback = titleOrCallback; + } + + var result = confirm(message); + callback && callback(result); + }; + + abp.message.prompt = function (message, titleOrOptionsOrCallback, callback) { + abp.log.warn('abp.message.prompt is not properly implemented!'); + + if (titleOrOptionsOrCallback && !(typeof titleOrOptionsOrCallback == 'string')) { + callback = titleOrOptionsOrCallback; + } + + var result = prompt(message); + callback && callback(result); + }; + + /* UI *******************************************************/ + + abp.ui = abp.ui || {}; + + /* UI BLOCK */ + //Defines UI Block API and implements basically + + var $abpBlockArea = document.createElement('div'); + $abpBlockArea.classList.add('abp-block-area'); + + /* opts: { //Can be an object with options or a string for query a selector + * elm: a query selector (optional - default: document.body) + * busy: boolean (optional - default: false) + * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided) + * } + */ + abp.ui.block = function (opts) { + if (!opts) { + opts = {}; + } else if (typeof opts == 'string') { + opts = { + elm: opts + }; + } + + var $elm = document.querySelector(opts.elm) || document.body; + + if (opts.busy) { + $abpBlockArea.classList.add('abp-block-area-busy'); + } else { + $abpBlockArea.classList.remove('abp-block-area-busy'); + } + + if (document.querySelector(opts.elm)) { + $abpBlockArea.style.position = 'absolute'; + } else { + $abpBlockArea.style.position = 'fixed'; + } + + $elm.appendChild($abpBlockArea); + + if (opts.promise) { + if (opts.promise.always) { //jQuery.Deferred style + opts.promise.always(function () { + abp.ui.unblock({ + $elm: opts.elm + }); + }); + } else if (opts.promise['finally']) { //Q style + opts.promise['finally'](function () { + abp.ui.unblock({ + $elm: opts.elm + }); + }); + } + } + }; + + /* opts: { + * + * } + */ + abp.ui.unblock = function (opts) { + var element = document.querySelector('.abp-block-area'); + if (element) { + element.classList.add('abp-block-area-disappearing'); + setTimeout(function () { + if (element) { + element.classList.remove('abp-block-area-disappearing'); + if (element.parentElement) { + element.parentElement.removeChild(element); + } + } + }, 250); + } + }; + + /* UI BUSY */ + //Defines UI Busy API, not implements it + + abp.ui.setBusy = function (opts) { + if (!opts) { + opts = { + busy: true + }; + } else if (typeof opts == 'string') { + opts = { + elm: opts, + busy: true + }; + } + + abp.ui.block(opts); + }; + + abp.ui.clearBusy = function (opts) { + abp.ui.unblock(opts); + }; + + /* SIMPLE EVENT BUS *****************************************/ + + abp.event = (function () { + + var _callbacks = {}; + + var on = function (eventName, callback) { + if (!_callbacks[eventName]) { + _callbacks[eventName] = []; + } + + _callbacks[eventName].push(callback); + }; + + var off = function (eventName, callback) { + var callbacks = _callbacks[eventName]; + if (!callbacks) { + return; + } + + var index = -1; + for (var i = 0; i < callbacks.length; i++) { + if (callbacks[i] === callback) { + index = i; + break; + } + } + + if (index < 0) { + return; + } + + _callbacks[eventName].splice(index, 1); + }; + + var trigger = function (eventName) { + var callbacks = _callbacks[eventName]; + if (!callbacks || !callbacks.length) { + return; + } + + var args = Array.prototype.slice.call(arguments, 1); + for (var i = 0; i < callbacks.length; i++) { + try { + callbacks[i].apply(this, args); + } catch(e) { + console.error(e); + } + } + }; + + // Public interface /////////////////////////////////////////////////// + + return { + on: on, + off: off, + trigger: trigger + }; + })(); + + + /* UTILS ***************************************************/ + + abp.utils = abp.utils || {}; + + /* Creates a name namespace. + * Example: + * var taskService = abp.utils.createNamespace(abp, 'services.task'); + * taskService will be equal to abp.services.task + * first argument (root) must be defined first + ************************************************************/ + abp.utils.createNamespace = function (root, ns) { + var parts = ns.split('.'); + for (var i = 0; i < parts.length; i++) { + if (typeof root[parts[i]] == 'undefined') { + root[parts[i]] = {}; + } + + root = root[parts[i]]; + } + + return root; + }; + + /* Find and replaces a string (search) to another string (replacement) in + * given string (str). + * Example: + * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string' + ************************************************************/ + abp.utils.replaceAll = function (str, search, replacement) { + var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + return str.replace(new RegExp(fix, 'g'), replacement); + }; + + /* Formats a string just like string.format in C#. + * Example: + * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana' + ************************************************************/ + abp.utils.formatString = function () { + if (arguments.length < 1) { + return null; + } + + var str = arguments[0]; + + for (var i = 1; i < arguments.length; i++) { + var placeHolder = '{' + (i - 1) + '}'; + str = abp.utils.replaceAll(str, placeHolder, arguments[i]); + } + + return str; + }; + + abp.utils.toPascalCase = function (str) { + if (!str || !str.length) { + return str; + } + + if (str.length === 1) { + return str.charAt(0).toUpperCase(); + } + + return str.charAt(0).toUpperCase() + str.substr(1); + } + + abp.utils.toCamelCase = function (str) { + if (!str || !str.length) { + return str; + } + + if (str.length === 1) { + return str.charAt(0).toLowerCase(); + } + + return str.charAt(0).toLowerCase() + str.substr(1); + } + + abp.utils.truncateString = function (str, maxLength) { + if (!str || !str.length || str.length <= maxLength) { + return str; + } + + return str.substr(0, maxLength); + }; + + abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) { + postfix = postfix || '...'; + + if (!str || !str.length || str.length <= maxLength) { + return str; + } + + if (maxLength <= postfix.length) { + return postfix.substr(0, maxLength); + } + + return str.substr(0, maxLength - postfix.length) + postfix; + }; + + abp.utils.isFunction = function (obj) { + return !!(obj && obj.constructor && obj.call && obj.apply); + }; + + /** + * parameterInfos should be an array of { name, value } objects + * where name is query string parameter name and value is it's value. + * includeQuestionMark is true by default. + */ + abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) { + if (includeQuestionMark === undefined) { + includeQuestionMark = true; + } + + var qs = ''; + + function addSeperator() { + if (!qs.length) { + if (includeQuestionMark) { + qs = qs + '?'; + } + } else { + qs = qs + '&'; + } + } + + for (var i = 0; i < parameterInfos.length; ++i) { + var parameterInfo = parameterInfos[i]; + if (parameterInfo.value === undefined) { + continue; + } + + if (parameterInfo.value === null) { + parameterInfo.value = ''; + } + + addSeperator(); + + if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") { + qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON()); + } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) { + for (var j = 0; j < parameterInfo.value.length; j++) { + if (j > 0) { + addSeperator(); + } + + qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]); + } + } else { + qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value); + } + } + + return qs; + } + + /** + * Sets a cookie value for given key. + * This is a simple implementation created to be used by ABP. + * Please use a complete cookie library if you need. + * @param {string} key + * @param {string} value + * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session. + * @param {string} path (optional) + */ + abp.utils.setCookieValue = function (key, value, expireDate, path) { + var cookieValue = encodeURIComponent(key) + '='; + + if (value) { + cookieValue = cookieValue + encodeURIComponent(value); + } + + if (expireDate) { + cookieValue = cookieValue + "; expires=" + expireDate.toUTCString(); + } + + if (path) { + cookieValue = cookieValue + "; path=" + path; + } + + document.cookie = cookieValue; + }; + + /** + * Gets a cookie with given key. + * This is a simple implementation created to be used by ABP. + * Please use a complete cookie library if you need. + * @param {string} key + * @returns {string} Cookie value or null + */ + abp.utils.getCookieValue = function (key) { + var equalities = document.cookie.split('; '); + for (var i = 0; i < equalities.length; i++) { + if (!equalities[i]) { + continue; + } + + var splitted = equalities[i].split('='); + if (splitted.length != 2) { + continue; + } + + if (decodeURIComponent(splitted[0]) === key) { + return decodeURIComponent(splitted[1] || ''); + } + } + + return null; + }; + + /** + * Deletes cookie for given key. + * This is a simple implementation created to be used by ABP. + * Please use a complete cookie library if you need. + * @param {string} key + * @param {string} path (optional) + */ + abp.utils.deleteCookie = function (key, path) { + var cookieValue = encodeURIComponent(key) + '='; + + cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString(); + + if (path) { + cookieValue = cookieValue + "; path=" + path; + } + + document.cookie = cookieValue; + } + + /** + * Escape HTML to help prevent XSS attacks. + */ + abp.utils.htmlEscape = function (html) { + return typeof html === 'string' ? html.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"') : html; + } + + /* SECURITY ***************************************/ + abp.security = abp.security || {}; + abp.security.antiForgery = abp.security.antiForgery || {}; + + abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; + + abp.security.antiForgery.getToken = function () { + return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); + }; + + /* CLOCK *****************************************/ + abp.clock = abp.clock || {}; + + abp.clock.kind = 'Unspecified'; + + abp.clock.supportsMultipleTimezone = function () { + return abp.clock.kind === 'Utc'; + } + + abp.clock.timeZone = function () { + return abp.setting.get('Abp.Timing.TimeZone') || abp.clock.browserTimeZone(); + } + + // Normalize Date object or date string to standard string format that will be sent to server + abp.clock.normalizeToString = function (date) { + if (!date) { + return date; + } + + var dateObj = date instanceof Date ? date : new Date(date); + if (isNaN(dateObj)) { + return date; + } + + function padZero(num) { + return num < 10 ? '0' + num : num; + } + + var addZulu = false; + if (abp.clock.supportsMultipleTimezone()) { + var timeZone = abp.clock.timeZone(); + var now = new Date(); + var formattedDate = now.toLocaleString('en-US', { timeZone: timeZone, timeZoneName: 'longOffset' }); + var match = formattedDate.match(/GMT([+-]\d+)/); + var targetOffsetHours = match ? parseInt(match[1], 10) : 0; + dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000)); + addZulu = true; + } + + // yyyy-MM-DDTHH:mm:ss + return dateObj.getFullYear() + '-' + + padZero(dateObj.getMonth() + 1) + '-' + + padZero(dateObj.getDate()) + 'T' + + padZero(dateObj.getHours()) + ':' + + padZero(dateObj.getMinutes()) + ':' + + padZero(dateObj.getSeconds()) + (addZulu ? 'Z' : ''); + }; + + // Default options for toLocaleString + abp.clock.toLocaleStringOptions = abp.clock.toLocaleStringOptions || { + "year": "numeric", + "month": "long", + "day": "numeric", + "hour": "numeric", + "minute": "numeric", + "second": "numeric" + }; + + // Normalize date string to locale date string that will be displayed to user + abp.clock.normalizeToLocaleString = function (dateString, options) { + if (!dateString) { + return dateString; + } + + var date = new Date(dateString); + if (isNaN(date)) { + return dateString; + } + + var culture = abp.localization.currentCulture.cultureName; + options = options || abp.clock.toLocaleStringOptions; + if (abp.clock.supportsMultipleTimezone()) { + var timezone = abp.clock.timeZone(); + if (timezone) { + return date.toLocaleString(culture, Object.assign({}, options, { timeZone: timezone })); + } + } + return date.toLocaleString(culture, options); + } + + abp.clock.browserTimeZone = function () { + return Intl.DateTimeFormat().resolvedOptions().timeZone; + } + + abp.clock.trySetBrowserTimeZoneToCookie = true; + + abp.clock.setBrowserTimeZoneToCookie = function () { + if (!abp.clock.trySetBrowserTimeZoneToCookie || !abp.clock.supportsMultipleTimezone()) { + return; + } + + abp.utils.setCookieValue('__timezone', abp.clock.browserTimeZone(), new Date(new Date().setFullYear(new Date().getFullYear() + 1)), '/'); + } + + abp.event.on('abp.configurationInitialized', function () { + abp.clock.setBrowserTimeZoneToCookie(); + }); + + /* FEATURES *************************************************/ + + abp.features = abp.features || {}; + + abp.features.values = abp.features.values || {}; + + abp.features.isEnabled = function(name){ + var value = abp.features.get(name); + return value == 'true' || value == 'True'; + } + + abp.features.get = function (name) { + return abp.features.values[name]; + }; + + /* GLOBAL FEATURES *************************************************/ + + abp.globalFeatures = abp.globalFeatures || {}; + + abp.globalFeatures.enabledFeatures = abp.globalFeatures.enabledFeatures || []; + + abp.globalFeatures.isEnabled = function(name){ + return abp.globalFeatures.enabledFeatures.indexOf(name) != -1; + } + +})(); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/jquery/abp.jquery.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/jquery/abp.jquery.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/jquery/abp.jquery.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/jquery/abp.jquery.js diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js new file mode 100644 index 000000000..40b3f965b --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js @@ -0,0 +1,102 @@ +var abp = abp || {}; +(function () { + + if (!luxon) { + throw "abp/luxon library requires the luxon library included to the page!"; + } + + /* TIMING *************************************************/ + + abp.timing = abp.timing || {}; + + var setObjectValue = function (obj, property, value) { + if (typeof property === "string") { + property = property.split('.'); + } + + if (property.length > 1) { + var p = property.shift(); + setObjectValue(obj[p], property, value); + } else { + obj[property[0]] = value; + } + } + + var getObjectValue = function (obj, property) { + return property.split('.').reduce((a, v) => a[v], obj) + } + + abp.timing.convertFieldsToIsoDate = function (form, fields) { + for (var field of fields) { + var dateTime = luxon.DateTime + .fromFormat( + getObjectValue(form, field), + abp.localization.currentCulture.dateTimeFormat.shortDatePattern, + { locale: abp.localization.currentCulture.cultureName } + ); + + if (!dateTime.invalid) { + setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) + } + } + + return form; + } + + // Normalize Date object or date string to standard string format that will be sent to server + abp.clock.normalizeToString = function (date) { + if (!date) { + return date; + } + + var dateObj = date instanceof Date ? date : new Date(date); + if (isNaN(dateObj)) { + return date; + } + + var timeZone = abp.clock.timeZone(); + if (abp.clock.supportsMultipleTimezone() && timeZone) { + return luxon.DateTime.fromObject({ + year: dateObj.getFullYear(), + month: dateObj.getMonth() + 1, + day: dateObj.getDate(), + hour: dateObj.getHours(), + minute: dateObj.getMinutes(), + second: dateObj.getSeconds() + }, { zone: timeZone }).setZone("utc").toISO(); + } else { + return luxon.DateTime.fromJSDate(dateObj).toFormat("yyyy-MM-dd'T'HH:mm:ss"); + } + }; + + // Normalize date string to locale date string that will be displayed to user + abp.clock.normalizeToLocaleString = function (dateString, options) { + if (!dateString) { + return dateString; + } + + var date = new Date(dateString); + if (isNaN(date)) { + return dateString; + } + + options = options || abp.clock.toLocaleStringOptions; + if (abp.clock.supportsMultipleTimezone()) { + var timezone = abp.clock.timeZone(); + if (timezone) { + return luxon.DateTime.fromJSDate(date) + .setZone(timezone) + .setLocale(abp.localization.currentCulture.cultureName) + .toLocaleString(options); + } + } + + return luxon.DateTime.fromJSDate(date) + .setLocale(abp.localization.currentCulture.cultureName) + .toLocaleString(options); + } + + abp.clock.browserTimeZone = function () { + return luxon.DateTime.local().zoneName; + } +})(jQuery); diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js new file mode 100644 index 000000000..28ebcc376 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js @@ -0,0 +1,694 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('just-compare')) : + typeof define === 'function' && define.amd ? define('@abp/utils', ['exports', 'just-compare'], factory) : + (global = global || self, factory((global.abp = global.abp || {}, global.abp.utils = global.abp.utils || {}, global.abp.utils.common = {}), global.compare)); +}(this, (function (exports, compare) { 'use strict'; + + compare = compare && Object.prototype.hasOwnProperty.call(compare, 'default') ? compare['default'] : compare; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; }; + return extendStatics(d, b); + }; + function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + var __assign = function () { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + function __rest(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + } + function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r = Reflect.decorate(decorators, target, key, desc); + else + for (var i = decorators.length - 1; i >= 0; i--) + if (d = decorators[i]) + r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + } + function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); }; + } + function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + } + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { + step(generator.next(value)); + } + catch (e) { + reject(e); + } } + function rejected(value) { try { + step(generator["throw"](value)); + } + catch (e) { + reject(e); + } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + function __generator(thisArg, body) { + var _ = { label: 0, sent: function () { if (t[0] & 1) + throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } + catch (e) { + op = [6, e]; + y = 0; + } + finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + } + var __createBinding = Object.create ? (function (o, m, k, k2) { + if (k2 === undefined) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } }); + }) : (function (o, m, k, k2) { + if (k2 === undefined) + k2 = k; + o[k2] = m[k]; + }); + function __exportStar(m, exports) { + for (var p in m) + if (p !== "default" && !exports.hasOwnProperty(p)) + __createBinding(exports, m, p); + } + function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function () { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } + catch (error) { + e = { error: error }; + } + finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } + finally { + if (e) + throw e.error; + } + } + return ar; + } + function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + } + function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) + s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + } + ; + function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + } + function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) + i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { + step(g[n](v)); + } + catch (e) { + settle(q[0][3], e); + } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); } + } + function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + } + function __asyncValues(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); } + } + function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } + else { + cooked.raw = raw; + } + return cooked; + } + ; + var __setModuleDefault = Object.create ? (function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function (o, v) { + o["default"] = v; + }; + function __importStar(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + } + function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; + } + function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + } + function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + } + + var ListNode = /** @class */ (function () { + function ListNode(value) { + this.value = value; + } + return ListNode; + }()); + var LinkedList = /** @class */ (function () { + function LinkedList() { + this.size = 0; + } + Object.defineProperty(LinkedList.prototype, "head", { + get: function () { + return this.first; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(LinkedList.prototype, "tail", { + get: function () { + return this.last; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(LinkedList.prototype, "length", { + get: function () { + return this.size; + }, + enumerable: false, + configurable: true + }); + LinkedList.prototype.attach = function (value, previousNode, nextNode) { + if (!previousNode) + return this.addHead(value); + if (!nextNode) + return this.addTail(value); + var node = new ListNode(value); + node.previous = previousNode; + previousNode.next = node; + node.next = nextNode; + nextNode.previous = node; + this.size++; + return node; + }; + LinkedList.prototype.attachMany = function (values, previousNode, nextNode) { + if (!values.length) + return []; + if (!previousNode) + return this.addManyHead(values); + if (!nextNode) + return this.addManyTail(values); + var list = new LinkedList(); + list.addManyTail(values); + list.first.previous = previousNode; + previousNode.next = list.first; + list.last.next = nextNode; + nextNode.previous = list.last; + this.size += values.length; + return list.toNodeArray(); + }; + LinkedList.prototype.detach = function (node) { + if (!node.previous) + return this.dropHead(); + if (!node.next) + return this.dropTail(); + node.previous.next = node.next; + node.next.previous = node.previous; + this.size--; + return node; + }; + LinkedList.prototype.add = function (value) { + var _this = this; + return { + after: function () { + var _a; + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return (_a = _this.addAfter).call.apply(_a, __spread([_this, value], params)); + }, + before: function () { + var _a; + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return (_a = _this.addBefore).call.apply(_a, __spread([_this, value], params)); + }, + byIndex: function (position) { return _this.addByIndex(value, position); }, + head: function () { return _this.addHead(value); }, + tail: function () { return _this.addTail(value); }, + }; + }; + LinkedList.prototype.addMany = function (values) { + var _this = this; + return { + after: function () { + var _a; + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return (_a = _this.addManyAfter).call.apply(_a, __spread([_this, values], params)); + }, + before: function () { + var _a; + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return (_a = _this.addManyBefore).call.apply(_a, __spread([_this, values], params)); + }, + byIndex: function (position) { return _this.addManyByIndex(values, position); }, + head: function () { return _this.addManyHead(values); }, + tail: function () { return _this.addManyTail(values); }, + }; + }; + LinkedList.prototype.addAfter = function (value, previousValue, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var previous = this.find(function (node) { return compareFn(node.value, previousValue); }); + return previous ? this.attach(value, previous, previous.next) : this.addTail(value); + }; + LinkedList.prototype.addBefore = function (value, nextValue, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var next = this.find(function (node) { return compareFn(node.value, nextValue); }); + return next ? this.attach(value, next.previous, next) : this.addHead(value); + }; + LinkedList.prototype.addByIndex = function (value, position) { + if (position < 0) + position += this.size; + else if (position >= this.size) + return this.addTail(value); + if (position <= 0) + return this.addHead(value); + var next = this.get(position); + return this.attach(value, next.previous, next); + }; + LinkedList.prototype.addHead = function (value) { + var node = new ListNode(value); + node.next = this.first; + if (this.first) + this.first.previous = node; + else + this.last = node; + this.first = node; + this.size++; + return node; + }; + LinkedList.prototype.addTail = function (value) { + var node = new ListNode(value); + if (this.first) { + node.previous = this.last; + this.last.next = node; + this.last = node; + } + else { + this.first = node; + this.last = node; + } + this.size++; + return node; + }; + LinkedList.prototype.addManyAfter = function (values, previousValue, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var previous = this.find(function (node) { return compareFn(node.value, previousValue); }); + return previous ? this.attachMany(values, previous, previous.next) : this.addManyTail(values); + }; + LinkedList.prototype.addManyBefore = function (values, nextValue, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var next = this.find(function (node) { return compareFn(node.value, nextValue); }); + return next ? this.attachMany(values, next.previous, next) : this.addManyHead(values); + }; + LinkedList.prototype.addManyByIndex = function (values, position) { + if (position < 0) + position += this.size; + if (position <= 0) + return this.addManyHead(values); + if (position >= this.size) + return this.addManyTail(values); + var next = this.get(position); + return this.attachMany(values, next.previous, next); + }; + LinkedList.prototype.addManyHead = function (values) { + var _this = this; + return values.reduceRight(function (nodes, value) { + nodes.unshift(_this.addHead(value)); + return nodes; + }, []); + }; + LinkedList.prototype.addManyTail = function (values) { + var _this = this; + return values.map(function (value) { return _this.addTail(value); }); + }; + LinkedList.prototype.drop = function () { + var _this = this; + return { + byIndex: function (position) { return _this.dropByIndex(position); }, + byValue: function () { + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return _this.dropByValue.apply(_this, params); + }, + byValueAll: function () { + var params = []; + for (var _i = 0; _i < arguments.length; _i++) { + params[_i] = arguments[_i]; + } + return _this.dropByValueAll.apply(_this, params); + }, + head: function () { return _this.dropHead(); }, + tail: function () { return _this.dropTail(); }, + }; + }; + LinkedList.prototype.dropMany = function (count) { + var _this = this; + return { + byIndex: function (position) { return _this.dropManyByIndex(count, position); }, + head: function () { return _this.dropManyHead(count); }, + tail: function () { return _this.dropManyTail(count); }, + }; + }; + LinkedList.prototype.dropByIndex = function (position) { + if (position < 0) + position += this.size; + var current = this.get(position); + return current ? this.detach(current) : undefined; + }; + LinkedList.prototype.dropByValue = function (value, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var position = this.findIndex(function (node) { return compareFn(node.value, value); }); + return position < 0 ? undefined : this.dropByIndex(position); + }; + LinkedList.prototype.dropByValueAll = function (value, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + var dropped = []; + for (var current = this.first, position = 0; current; position++, current = current.next) { + if (compareFn(current.value, value)) { + dropped.push(this.dropByIndex(position - dropped.length)); + } + } + return dropped; + }; + LinkedList.prototype.dropHead = function () { + var head = this.first; + if (head) { + this.first = head.next; + if (this.first) + this.first.previous = undefined; + else + this.last = undefined; + this.size--; + return head; + } + return undefined; + }; + LinkedList.prototype.dropTail = function () { + var tail = this.last; + if (tail) { + this.last = tail.previous; + if (this.last) + this.last.next = undefined; + else + this.first = undefined; + this.size--; + return tail; + } + return undefined; + }; + LinkedList.prototype.dropManyByIndex = function (count, position) { + if (count <= 0) + return []; + if (position < 0) + position = Math.max(position + this.size, 0); + else if (position >= this.size) + return []; + count = Math.min(count, this.size - position); + var dropped = []; + while (count--) { + var current = this.get(position); + dropped.push(this.detach(current)); + } + return dropped; + }; + LinkedList.prototype.dropManyHead = function (count) { + if (count <= 0) + return []; + count = Math.min(count, this.size); + var dropped = []; + while (count--) + dropped.unshift(this.dropHead()); + return dropped; + }; + LinkedList.prototype.dropManyTail = function (count) { + if (count <= 0) + return []; + count = Math.min(count, this.size); + var dropped = []; + while (count--) + dropped.push(this.dropTail()); + return dropped; + }; + LinkedList.prototype.find = function (predicate) { + for (var current = this.first, position = 0; current; position++, current = current.next) { + if (predicate(current, position, this)) + return current; + } + return undefined; + }; + LinkedList.prototype.findIndex = function (predicate) { + for (var current = this.first, position = 0; current; position++, current = current.next) { + if (predicate(current, position, this)) + return position; + } + return -1; + }; + LinkedList.prototype.forEach = function (iteratorFn) { + for (var node = this.first, position = 0; node; position++, node = node.next) { + iteratorFn(node, position, this); + } + }; + LinkedList.prototype.get = function (position) { + return this.find(function (_, index) { return position === index; }); + }; + LinkedList.prototype.indexOf = function (value, compareFn) { + if (compareFn === void 0) { compareFn = compare; } + return this.findIndex(function (node) { return compareFn(node.value, value); }); + }; + LinkedList.prototype.toArray = function () { + var array = new Array(this.size); + this.forEach(function (node, index) { return (array[index] = node.value); }); + return array; + }; + LinkedList.prototype.toNodeArray = function () { + var array = new Array(this.size); + this.forEach(function (node, index) { return (array[index] = node); }); + return array; + }; + LinkedList.prototype.toString = function (mapperFn) { + if (mapperFn === void 0) { mapperFn = JSON.stringify; } + return this.toArray() + .map(function (value) { return mapperFn(value); }) + .join(' <-> '); + }; + // Cannot use Generator type because of ng-packagr + LinkedList.prototype[Symbol.iterator] = function () { + var node, position; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + node = this.first, position = 0; + _a.label = 1; + case 1: + if (!node) return [3 /*break*/, 4]; + return [4 /*yield*/, node.value]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + position++, node = node.next; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/]; + } + }); + }; + return LinkedList; + }()); + + /* + * Public API Surface of utils + */ + + /** + * Generated bundle index. Do not edit. + */ + + exports.LinkedList = LinkedList; + exports.ListNode = ListNode; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=abp-utils.umd.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.css.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.css.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.css.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.css.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/bootstrap-datepicker.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker-en-CA.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-DZ.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-DZ.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-DZ.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-DZ.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar-tn.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ar.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.az.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bg.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bm.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bn.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.br.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.bs.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ca.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cs.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.cy.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.da.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.de.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.el.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-AU.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-CA.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-GB.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-IE.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-NZ.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-US.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-US.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-US.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-US.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.en-ZA.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eo.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.es.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.et.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.eu.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fa.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fo.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr-CH.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.fr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.gl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.he.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hu.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.hy.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.id.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.is.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it-CH.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.it.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ja.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ka.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kh.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.km.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ko.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.kr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lt.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.lv.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.me.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mn.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.mr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ms.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.nl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.no.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.oc.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.pt.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ro.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs-latin.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.rs.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ru.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.si.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sq.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr-latin.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sv.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.ta.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tg.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.th.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.tr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-cyrl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.uz-latn.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.vi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap-daterangepicker/daterangepicker.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.css.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.min.css.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.tooltips.everywhere.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.tooltips.everywhere.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.tooltips.everywhere.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/bootstrap/js/bootstrap.enable.tooltips.everywhere.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/js/dataTables.bootstrap5.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/js/dataTables.bootstrap5.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/js/dataTables.bootstrap5.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net-bs5/js/dataTables.bootstrap5.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/datatables.net/js/dataTables.min.js diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js new file mode 100644 index 000000000..009306070 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js @@ -0,0 +1,435 @@ +/** + * @license + * Unobtrusive validation support library for jQuery and jQuery Validate + * Copyright (c) .NET Foundation. All rights reserved. + * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + * @version v4.0.0 + */ + +/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ +/*global document: false, jQuery: false */ + +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define("jquery.validate.unobtrusive", ['jquery-validation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports + module.exports = factory(require('jquery-validation')); + } else { + // Browser global + jQuery.validator.unobtrusive = factory(jQuery); + } +}(function ($) { + var $jQval = $.validator, + adapters, + data_validation = "unobtrusiveValidation"; + + function setValidationValues(options, ruleName, value) { + options.rules[ruleName] = value; + if (options.message) { + options.messages[ruleName] = options.message; + } + } + + function splitAndTrim(value) { + return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); + } + + function escapeAttributeValue(value) { + // As mentioned on http://api.jquery.com/category/selectors/ + return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); + } + + function getModelPrefix(fieldName) { + return fieldName.substr(0, fieldName.lastIndexOf(".") + 1); + } + + function appendModelPrefix(value, prefix) { + if (value.indexOf("*.") === 0) { + value = value.replace("*.", prefix); + } + return value; + } + + function onError(error, inputElement) { // 'this' is the form element + var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), + replaceAttrValue = container.attr("data-valmsg-replace"), + replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null; + + container.removeClass("field-validation-valid").addClass("field-validation-error"); + error.data("unobtrusiveContainer", container); + + if (replace) { + container.empty(); + error.removeClass("input-validation-error").appendTo(container); + } + else { + error.hide(); + } + } + + function onErrors(event, validator) { // 'this' is the form element + var container = $(this).find("[data-valmsg-summary=true]"), + list = container.find("ul"); + + if (list && list.length && validator.errorList.length) { + list.empty(); + container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); + + $.each(validator.errorList, function () { + $("
  • ").html(this.message).appendTo(list); + }); + } + } + + function onSuccess(error) { // 'this' is the form element + var container = error.data("unobtrusiveContainer"); + + if (container) { + var replaceAttrValue = container.attr("data-valmsg-replace"), + replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; + + container.addClass("field-validation-valid").removeClass("field-validation-error"); + error.removeData("unobtrusiveContainer"); + + if (replace) { + container.empty(); + } + } + } + + function onReset(event) { // 'this' is the form element + var $form = $(this), + key = '__jquery_unobtrusive_validation_form_reset'; + if ($form.data(key)) { + return; + } + // Set a flag that indicates we're currently resetting the form. + $form.data(key, true); + try { + $form.data("validator").resetForm(); + } finally { + $form.removeData(key); + } + + $form.find(".validation-summary-errors") + .addClass("validation-summary-valid") + .removeClass("validation-summary-errors"); + $form.find(".field-validation-error") + .addClass("field-validation-valid") + .removeClass("field-validation-error") + .removeData("unobtrusiveContainer") + .find(">*") // If we were using valmsg-replace, get the underlying error + .removeData("unobtrusiveContainer"); + } + + function validationInfo(form) { + var $form = $(form), + result = $form.data(data_validation), + onResetProxy = $.proxy(onReset, form), + defaultOptions = $jQval.unobtrusive.options || {}, + execInContext = function (name, args) { + var func = defaultOptions[name]; + func && $.isFunction(func) && func.apply(form, args); + }; + + if (!result) { + result = { + options: { // options structure passed to jQuery Validate's validate() method + errorClass: defaultOptions.errorClass || "input-validation-error", + errorElement: defaultOptions.errorElement || "span", + errorPlacement: function () { + onError.apply(form, arguments); + execInContext("errorPlacement", arguments); + }, + invalidHandler: function () { + onErrors.apply(form, arguments); + execInContext("invalidHandler", arguments); + }, + messages: {}, + rules: {}, + success: function () { + onSuccess.apply(form, arguments); + execInContext("success", arguments); + } + }, + attachValidation: function () { + $form + .off("reset." + data_validation, onResetProxy) + .on("reset." + data_validation, onResetProxy) + .validate(this.options); + }, + validate: function () { // a validation function that is called by unobtrusive Ajax + $form.validate(); + return $form.valid(); + } + }; + $form.data(data_validation, result); + } + + return result; + } + + $jQval.unobtrusive = { + adapters: [], + + parseElement: function (element, skipAttach) { + /// + /// Parses a single HTML element for unobtrusive validation attributes. + /// + /// The HTML element to be parsed. + /// [Optional] true to skip attaching the + /// validation to the form. If parsing just this single element, you should specify true. + /// If parsing several elements, you should specify false, and manually attach the validation + /// to the form when you are finished. The default is false. + var $element = $(element), + form = $element.parents("form")[0], + valInfo, rules, messages; + + if (!form) { // Cannot do client-side validation without a form + return; + } + + valInfo = validationInfo(form); + valInfo.options.rules[element.name] = rules = {}; + valInfo.options.messages[element.name] = messages = {}; + + $.each(this.adapters, function () { + var prefix = "data-val-" + this.name, + message = $element.attr(prefix), + paramValues = {}; + + if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy) + prefix += "-"; + + $.each(this.params, function () { + paramValues[this] = $element.attr(prefix + this); + }); + + this.adapt({ + element: element, + form: form, + message: message, + params: paramValues, + rules: rules, + messages: messages + }); + } + }); + + $.extend(rules, { "__dummy__": true }); + + if (!skipAttach) { + valInfo.attachValidation(); + } + }, + + parse: function (selector) { + /// + /// Parses all the HTML elements in the specified selector. It looks for input elements decorated + /// with the [data-val=true] attribute value and enables validation according to the data-val-* + /// attribute values. + /// + /// Any valid jQuery selector. + + // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one + // element with data-val=true + var $selector = $(selector), + $forms = $selector.parents() + .addBack() + .filter("form") + .add($selector.find("form")) + .has("[data-val=true]"); + + $selector.find("[data-val=true]").each(function () { + $jQval.unobtrusive.parseElement(this, true); + }); + + $forms.each(function () { + var info = validationInfo(this); + if (info) { + info.attachValidation(); + } + }); + } + }; + + adapters = $jQval.unobtrusive.adapters; + + adapters.add = function (adapterName, params, fn) { + /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation. + /// The name of the adapter to be added. This matches the name used + /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). + /// [Optional] An array of parameter names (strings) that will + /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and + /// mmmm is the parameter name). + /// The function to call, which adapts the values from the HTML + /// attributes into jQuery Validate rules and/or messages. + /// + if (!fn) { // Called with no params, just a function + fn = params; + params = []; + } + this.push({ name: adapterName, params: params, adapt: fn }); + return this; + }; + + adapters.addBool = function (adapterName, ruleName) { + /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where + /// the jQuery Validate validation rule has no parameter values. + /// The name of the adapter to be added. This matches the name used + /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). + /// [Optional] The name of the jQuery Validate rule. If not provided, the value + /// of adapterName will be used instead. + /// + return this.add(adapterName, function (options) { + setValidationValues(options, ruleName || adapterName, true); + }); + }; + + adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) { + /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where + /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and + /// one for min-and-max). The HTML parameters are expected to be named -min and -max. + /// The name of the adapter to be added. This matches the name used + /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). + /// The name of the jQuery Validate rule to be used when you only + /// have a minimum value. + /// The name of the jQuery Validate rule to be used when you only + /// have a maximum value. + /// The name of the jQuery Validate rule to be used when you + /// have both a minimum and maximum value. + /// [Optional] The name of the HTML attribute that + /// contains the minimum value. The default is "min". + /// [Optional] The name of the HTML attribute that + /// contains the maximum value. The default is "max". + /// + return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) { + var min = options.params.min, + max = options.params.max; + + if (min && max) { + setValidationValues(options, minMaxRuleName, [min, max]); + } + else if (min) { + setValidationValues(options, minRuleName, min); + } + else if (max) { + setValidationValues(options, maxRuleName, max); + } + }); + }; + + adapters.addSingleVal = function (adapterName, attribute, ruleName) { + /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where + /// the jQuery Validate validation rule has a single value. + /// The name of the adapter to be added. This matches the name used + /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name). + /// [Optional] The name of the HTML attribute that contains the value. + /// The default is "val". + /// [Optional] The name of the jQuery Validate rule. If not provided, the value + /// of adapterName will be used instead. + /// + return this.add(adapterName, [attribute || "val"], function (options) { + setValidationValues(options, ruleName || adapterName, options.params[attribute]); + }); + }; + + $jQval.addMethod("__dummy__", function (value, element, params) { + return true; + }); + + $jQval.addMethod("regex", function (value, element, params) { + var match; + if (this.optional(element)) { + return true; + } + + match = new RegExp(params).exec(value); + return (match && (match.index === 0) && (match[0].length === value.length)); + }); + + $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) { + var match; + if (nonalphamin) { + match = value.match(/\W/g); + match = match && match.length >= nonalphamin; + } + return match; + }); + + if ($jQval.methods.extension) { + adapters.addSingleVal("accept", "mimtype"); + adapters.addSingleVal("extension", "extension"); + } else { + // for backward compatibility, when the 'extension' validation method does not exist, such as with versions + // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for + // validating the extension, and ignore mime-type validations as they are not supported. + adapters.addSingleVal("extension", "extension", "accept"); + } + + adapters.addSingleVal("regex", "pattern"); + adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"); + adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range"); + adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength"); + adapters.add("equalto", ["other"], function (options) { + var prefix = getModelPrefix(options.element.name), + other = options.params.other, + fullOtherName = appendModelPrefix(other, prefix), + element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0]; + + setValidationValues(options, "equalTo", element); + }); + adapters.add("required", function (options) { + // jQuery Validate equates "required" with "mandatory" for checkbox elements + if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") { + setValidationValues(options, "required", true); + } + }); + adapters.add("remote", ["url", "type", "additionalfields"], function (options) { + var value = { + url: options.params.url, + type: options.params.type || "GET", + data: {} + }, + prefix = getModelPrefix(options.element.name); + + $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { + var paramName = appendModelPrefix(fieldName, prefix); + value.data[paramName] = function () { + var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']"); + // For checkboxes and radio buttons, only pick up values from checked fields. + if (field.is(":checkbox")) { + return field.filter(":checked").val() || field.filter(":hidden").val() || ''; + } + else if (field.is(":radio")) { + return field.filter(":checked").val() || ''; + } + return field.val(); + }; + }); + + setValidationValues(options, "remote", value); + }); + adapters.add("password", ["min", "nonalphamin", "regex"], function (options) { + if (options.params.min) { + setValidationValues(options, "minlength", options.params.min); + } + if (options.params.nonalphamin) { + setValidationValues(options, "nonalphamin", options.params.nonalphamin); + } + if (options.params.regex) { + setValidationValues(options, "regex", options.params.regex); + } + }); + adapters.add("fileextensions", ["extensions"], function (options) { + setValidationValues(options, "extension", options.params.extensions); + }); + + $(function () { + $jQval.unobtrusive.parse(document); + }); + + return $jQval.unobtrusive; +})); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/abp.jquery.validate.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/jquery.validate.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/jquery.validate.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/jquery.validate.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/jquery.validate.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ar.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_az.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bg.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_bn_BD.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ca.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_cs.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_da.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_de.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_el.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_AR.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_es_PE.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_et.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_eu.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fa.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_fr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ge.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_gl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_he.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hu.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_hy_AM.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_id.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_is.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_it.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ja.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ka.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_kk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ko.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lt.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_lv.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_mk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_my.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_nl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_no.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_BR.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_pt_PT.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ro.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ru.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sd.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_si.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sr_lat.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_sv.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_th.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tj.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_tr.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_uk.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_ur.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_vi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/messages_zh_TW.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_de.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_es_CL.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_fi.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_it.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_nl.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery-validation/localization/methods_pt.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery/jquery.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery/jquery.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery/jquery.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/jquery/jquery.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/lodash/lodash.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/lodash/lodash.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/lodash/lodash.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/lodash/lodash.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js.map b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js.map similarity index 100% rename from aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js.map rename to aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/luxon/luxon.min.js.map diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js new file mode 100644 index 000000000..611808654 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js @@ -0,0 +1,5 @@ +/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); +/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */ +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["
    ","
    "],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"
    ":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("
    ");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("
    ").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["","","",""],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r0&&cr?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]=0&&a[0]+e[1]a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){ +return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&a[0]+ae(n)[0]=0&&a[1]+ae(n)[1]=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}); \ No newline at end of file diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css new file mode 100644 index 000000000..45152c1be --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css @@ -0,0 +1,1267 @@ +/* +== malihu jquery custom scrollbar plugin == +Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller +*/ + + + +/* +CONTENTS: + 1. BASIC STYLE - Plugin's basic/essential CSS properties (normally, should not be edited). + 2. VERTICAL SCROLLBAR - Positioning and dimensions of vertical scrollbar. + 3. HORIZONTAL SCROLLBAR - Positioning and dimensions of horizontal scrollbar. + 4. VERTICAL AND HORIZONTAL SCROLLBARS - Positioning and dimensions of 2-axis scrollbars. + 5. TRANSITIONS - CSS3 transitions for hover events, auto-expanded and auto-hidden scrollbars. + 6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS + 6.1 THEMES - Scrollbar colors, opacity, dimensions, backgrounds etc. via ready-to-use themes. +*/ + + + +/* +------------------------------------------------------------------------------------------------------------------------ +1. BASIC STYLE +------------------------------------------------------------------------------------------------------------------------ +*/ + + .mCustomScrollbar{ -ms-touch-action: pinch-zoom; touch-action: pinch-zoom; /* direct pointer events to js */ } + .mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; } + + .mCustomScrollBox{ /* contains plugin's markup */ + position: relative; + overflow: hidden; + height: 100%; + max-width: 100%; + outline: none; + direction: ltr; + } + + .mCSB_container{ /* contains the original content */ + overflow: hidden; + width: auto; + height: auto; + } + + + +/* +------------------------------------------------------------------------------------------------------------------------ +2. VERTICAL SCROLLBAR +y-axis +------------------------------------------------------------------------------------------------------------------------ +*/ + + .mCSB_inside > .mCSB_container{ margin-right: 30px; } + + .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */ + + .mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */ + margin-right: 0; + margin-left: 30px; + } + + .mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */ + + .mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */ + position: absolute; + width: 16px; + height: auto; + left: auto; + top: 0; + right: 0; + bottom: 0; + } + + .mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */ + + .mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools, + .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */ + right: auto; + left: 0; + } + + .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */ + + .mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + height: auto; + } + + .mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; } + + .mCSB_scrollTools .mCSB_draggerRail{ + width: 2px; + height: 100%; + margin: 0 auto; + -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; + } + + .mCSB_scrollTools .mCSB_dragger{ /* the draggable element */ + cursor: pointer; + width: 100%; + height: 30px; /* minimum dragger height */ + z-index: 1; + } + + .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */ + position: relative; + width: 4px; + height: 100%; + margin: 0 auto; + -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; + text-align: center; + } + + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ } + + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ } + + .mCSB_scrollTools .mCSB_buttonUp, + .mCSB_scrollTools .mCSB_buttonDown{ + display: block; + position: absolute; + height: 20px; + width: 100%; + overflow: hidden; + margin: 0 auto; + cursor: pointer; + } + + .mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; } + + + +/* +------------------------------------------------------------------------------------------------------------------------ +3. HORIZONTAL SCROLLBAR +x-axis +------------------------------------------------------------------------------------------------------------------------ +*/ + + .mCSB_horizontal.mCSB_inside > .mCSB_container{ + margin-right: 0; + margin-bottom: 30px; + } + + .mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; } + + .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */ + + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ + width: auto; + height: 16px; + top: auto; + right: 0; + bottom: 0; + left: 0; + } + + .mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal, + .mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */ + + .mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + width: 100%; + height: 2px; + margin: 7px 0; + } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{ + width: 30px; /* minimum dragger width */ + height: 100%; + left: 0; + } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + width: 100%; + height: 4px; + margin: 6px auto; + } + + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ + height: 12px; /* auto-expanded scrollbar */ + margin: 2px auto; + } + + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ + height: 8px; /* auto-expanded scrollbar */ + margin: 4px 0; + } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft, + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ + display: block; + position: absolute; + width: 20px; + height: 100%; + overflow: hidden; + margin: 0 auto; + cursor: pointer; + } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; } + + .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; } + + + +/* +------------------------------------------------------------------------------------------------------------------------ +4. VERTICAL AND HORIZONTAL SCROLLBARS +yx-axis +------------------------------------------------------------------------------------------------------------------------ +*/ + + .mCSB_container_wrapper{ + position: absolute; + height: auto; + width: auto; + overflow: hidden; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin-right: 30px; + margin-bottom: 30px; + } + + .mCSB_container_wrapper > .mCSB_container{ + padding-right: 30px; + padding-bottom: 30px; + -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; + } + + .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; } + + .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; } + + /* non-visible horizontal scrollbar */ + .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; } + + /* non-visible vertical scrollbar/RTL direction/left-side scrollbar */ + .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal, + .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; } + + /* RTL direction/left-side scrollbar */ + .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; } + + /* non-visible scrollbar/RTL direction/left-side scrollbar */ + .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; } + + .mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */ + margin-right: 0; + margin-left: 30px; + } + + .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{ padding-right: 0; } + + .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{ padding-bottom: 0; } + + .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{ + margin-right: 0; /* non-visible scrollbar */ + margin-left: 0; + } + + /* non-visible horizontal scrollbar */ + .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } + + + +/* +------------------------------------------------------------------------------------------------------------------------ +5. TRANSITIONS +------------------------------------------------------------------------------------------------------------------------ +*/ + + .mCSB_scrollTools, + .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCSB_scrollTools .mCSB_buttonUp, + .mCSB_scrollTools .mCSB_buttonDown, + .mCSB_scrollTools .mCSB_buttonLeft, + .mCSB_scrollTools .mCSB_buttonRight{ + -webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; + -o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; + transition: opacity .2s ease-in-out, background-color .2s ease-in-out; + } + + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */ + .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail, + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, + .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{ + -webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s, + margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, + margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, + opacity .2s ease-in-out, background-color .2s ease-in-out; + -moz-transition: width .2s ease-out .2s, height .2s ease-out .2s, + margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, + margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, + opacity .2s ease-in-out, background-color .2s ease-in-out; + -o-transition: width .2s ease-out .2s, height .2s ease-out .2s, + margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, + margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, + opacity .2s ease-in-out, background-color .2s ease-in-out; + transition: width .2s ease-out .2s, height .2s ease-out .2s, + margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, + margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, + opacity .2s ease-in-out, background-color .2s ease-in-out; + } + + + +/* +------------------------------------------------------------------------------------------------------------------------ +6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS +------------------------------------------------------------------------------------------------------------------------ +*/ + + /* + ---------------------------------------- + 6.1 THEMES + ---------------------------------------- + */ + + /* default theme ("light") */ + + .mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; } + + .mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools, + .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; } + + .mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag, + .mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag, + .mCustomScrollBox:hover > .mCSB_scrollTools, + .mCustomScrollBox:hover ~ .mCSB_scrollTools, + .mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools, + .mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; } + + .mCSB_scrollTools .mCSB_draggerRail{ + background-color: #000; background-color: rgba(0,0,0,0.4); + filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)"; + } + + .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-color: #fff; background-color: rgba(255,255,255,0.75); + filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; + } + + .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ + background-color: #fff; background-color: rgba(255,255,255,0.85); + filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)"; + } + .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ + background-color: #fff; background-color: rgba(255,255,255,0.9); + filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; + } + + .mCSB_scrollTools .mCSB_buttonUp, + .mCSB_scrollTools .mCSB_buttonDown, + .mCSB_scrollTools .mCSB_buttonLeft, + .mCSB_scrollTools .mCSB_buttonRight{ + background-image: url(mCSB_buttons.png); /* css sprites */ + background-repeat: no-repeat; + opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)"; + } + + .mCSB_scrollTools .mCSB_buttonUp{ + background-position: 0 0; + /* + sprites locations + light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px + dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px + */ + } + + .mCSB_scrollTools .mCSB_buttonDown{ + background-position: 0 -20px; + /* + sprites locations + light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px + dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px + */ + } + + .mCSB_scrollTools .mCSB_buttonLeft{ + background-position: 0 -40px; + /* + sprites locations + light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px + dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px + */ + } + + .mCSB_scrollTools .mCSB_buttonRight{ + background-position: 0 -56px; + /* + sprites locations + light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px + dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px + */ + } + + .mCSB_scrollTools .mCSB_buttonUp:hover, + .mCSB_scrollTools .mCSB_buttonDown:hover, + .mCSB_scrollTools .mCSB_buttonLeft:hover, + .mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; } + + .mCSB_scrollTools .mCSB_buttonUp:active, + .mCSB_scrollTools .mCSB_buttonDown:active, + .mCSB_scrollTools .mCSB_buttonLeft:active, + .mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; } + + + /* theme: "dark" */ + + .mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } + + .mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); } + + .mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); } + + .mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; } + + .mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; } + + .mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; } + + .mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; } + + /* ---------------------------------------- */ + + + + /* theme: "light-2", "dark-2" */ + + .mCS-light-2.mCSB_scrollTools .mCSB_draggerRail, + .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{ + width: 4px; + background-color: #fff; background-color: rgba(255,255,255,0.1); + -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; + } + + .mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + width: 4px; + background-color: #fff; background-color: rgba(255,255,255,0.75); + -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; + } + + .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + width: 100%; + height: 4px; + margin: 6px auto; + } + + .mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } + + .mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } + + .mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; } + + .mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; } + + .mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; } + + .mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; } + + + /* theme: "dark-2" */ + + .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{ + background-color: #000; background-color: rgba(0,0,0,0.1); + -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; + } + + .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-color: #000; background-color: rgba(0,0,0,0.75); + -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; + } + + .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; } + + .mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; } + + .mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; } + + .mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; } + + /* ---------------------------------------- */ + + + + /* theme: "light-thick", "dark-thick" */ + + .mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail, + .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{ + width: 4px; + background-color: #fff; background-color: rgba(255,255,255,0.1); + -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; + } + + .mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + width: 6px; + background-color: #fff; background-color: rgba(255,255,255,0.75); + -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; + } + + .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + width: 100%; + height: 4px; + margin: 6px 0; + } + + .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + width: 100%; + height: 6px; + margin: 5px auto; + } + + .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } + + .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } + + .mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; } + + .mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; } + + .mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; } + + .mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; } + + + /* theme: "dark-thick" */ + + .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{ + background-color: #000; background-color: rgba(0,0,0,0.1); + -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; + } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-color: #000; background-color: rgba(0,0,0,0.75); + -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; + } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; } + + .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; } + + /* ---------------------------------------- */ + + + + /* theme: "light-thin", "dark-thin" */ + + .mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); } + + .mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; } + + .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; } + + .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + width: 100%; + height: 2px; + margin: 7px auto; + } + + + /* theme "dark-thin" */ + + .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; } + + .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; } + + /* ---------------------------------------- */ + + + + /* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */ + + .mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); } + + .mCS-rounded.mCSB_scrollTools .mCSB_dragger, + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger, + .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; } + + .mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + width: 14px; + margin: 0 1px; + } + + .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger, + .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger, + .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger, + .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; } + + .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + height: 14px; + margin: 1px 0; + } + + .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ + width: 16px; /* auto-expanded scrollbar */ + height: 16px; + margin: -1px 0; + } + + .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, + .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ } + + .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ + height: 16px; /* auto-expanded scrollbar */ + width: 16px; + margin: 0 -1px; + } + + .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, + .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ + height: 4px; /* auto-expanded scrollbar */ + margin: 6px 0; + } + + .mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; } + + .mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; } + + .mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; } + + .mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; } + + + /* theme "rounded-dark", "rounded-dots-dark" */ + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; } + + .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; } + + + /* theme "rounded-dots", "rounded-dots-dark" */ + + .mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail, + .mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + background-color: transparent; + background-position: center; + } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail, + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{ + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg=="); + background-repeat: repeat-y; + opacity: 0.3; + filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; + } + + .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + height: 4px; + margin: 6px 0; + background-repeat: repeat-x; + } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; } + + .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; } + + + /* theme "rounded-dots-dark" */ + + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{ + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII="); + } + + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; } + + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; } + + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; } + + .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; } + + /* ---------------------------------------- */ + + + + /* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */ + + .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-repeat: repeat-y; + background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); + background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0))); + background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + } + + .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + background-repeat: repeat-x; + background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0))); + background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); + } + + + /* theme "3d", "3d-dark" */ + + .mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger, + .mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; } + + .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger, + .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; } + + .mCS-3d.mCSB_scrollTools, + .mCS-3d-dark.mCSB_scrollTools{ + opacity: 1; + filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; + } + + .mCS-3d.mCSB_scrollTools .mCSB_draggerRail, + .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; } + + .mCS-3d.mCSB_scrollTools .mCSB_draggerRail, + .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{ + width: 8px; + background-color: #000; background-color: rgba(0,0,0,0.2); + box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2); + } + + .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; } + + .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; } + + .mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + width: 100%; + height: 8px; + margin: 4px 0; + box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2); + } + + .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + width: 100%; + height: 8px; + margin: 4px auto; + } + + .mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } + + .mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } + + .mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } + + .mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } + + + /* theme "3d-dark" */ + + .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{ + background-color: #000; background-color: rgba(0,0,0,0.1); + box-shadow: inset 1px 0 1px rgba(0,0,0,0.1); + } + + .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); } + + .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } + + .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } + + .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } + + .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } + + /* ---------------------------------------- */ + + + + /* theme: "3d-thick", "3d-thick-dark" */ + + .mCS-3d-thick.mCSB_scrollTools, + .mCS-3d-thick-dark.mCSB_scrollTools{ + opacity: 1; + filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; + } + + .mCS-3d-thick.mCSB_scrollTools, + .mCS-3d-thick-dark.mCSB_scrollTools, + .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } + + .mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical, + .mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; } + + .mCS-3d-thick.mCSB_scrollTools_vertical, + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); } + + .mCS-3d-thick.mCSB_scrollTools_horizontal, + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ + bottom: 1px; + box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); + } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + box-shadow: inset 1px 0 0 rgba(255,255,255,0.4); + width: 12px; + margin: 2px; + position: absolute; + height: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + } + + .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; } + + .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + height: 12px; + width: auto; + } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{ + background-color: #000; background-color: rgba(0,0,0,0.05); + box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1); + } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } + + .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } + + + /* theme: "3d-thick-dark" */ + + .mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); } + + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); } + + .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ + background-color: #fff; background-color: rgba(0,0,0,0.05); + box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1); + } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } + + .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } + + /* ---------------------------------------- */ + + + + /* theme: "minimal", "minimal-dark" */ + + .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical, + .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{ + right: 0; + margin: 12px 0; + } + + .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal, + .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal, + .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal, + .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ + bottom: 0; + margin: 0 12px; + } + + /* RTL direction/left-side scrollbar */ + .mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical, + .mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{ + left: 0; + right: auto; + } + + .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail, + .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } + + .mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger, + .mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; } + + .mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger, + .mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; } + + .mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-color: #fff; background-color: rgba(255,255,255,0.2); + filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)"; + } + + .mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ + background-color: #fff; background-color: rgba(255,255,255,0.5); + filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)"; + } + + + /* theme: "minimal-dark" */ + + .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + background-color: #000; background-color: rgba(0,0,0,0.2); + filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)"; + } + + .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ + background-color: #000; background-color: rgba(0,0,0,0.5); + filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)"; + } + + /* ---------------------------------------- */ + + + + /* theme "light-3", "dark-3" */ + + .mCS-light-3.mCSB_scrollTools .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ + width: 6px; + background-color: #000; background-color: rgba(0,0,0,0.2); + } + + .mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; } + + .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + width: 100%; + height: 6px; + margin: 5px 0; + } + + .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ + width: 12px; + } + + .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, + .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ + height: 12px; + margin: 2px 0; + } + + .mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } + + .mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } + + .mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } + + .mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } + + + /* theme "dark-3" */ + + .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); } + + .mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } + + .mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } + + .mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } + + .mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } + + /* ---------------------------------------- */ + + + + /* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */ + + .mCS-inset.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ + width: 12px; + background-color: #000; background-color: rgba(0,0,0,0.2); + } + + .mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ + width: 6px; + margin: 3px 5px; + position: absolute; + height: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + } + + .mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ + height: 6px; + margin: 5px 3px; + position: absolute; + width: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + } + + .mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail, + .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ + width: 100%; + height: 12px; + margin: 2px 0; + } + + .mCS-inset.mCSB_scrollTools .mCSB_buttonUp, + .mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp, + .mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } + + .mCS-inset.mCSB_scrollTools .mCSB_buttonDown, + .mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown, + .mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } + + .mCS-inset.mCSB_scrollTools .mCSB_buttonLeft, + .mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft, + .mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } + + .mCS-inset.mCSB_scrollTools .mCSB_buttonRight, + .mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight, + .mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } + + + /* theme "inset-dark", "inset-2-dark", "inset-3-dark" */ + + .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } + + .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } + + + /* theme "inset-2", "inset-2-dark" */ + + .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail, + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ + background-color: transparent; + border-width: 1px; + border-style: solid; + border-color: #fff; + border-color: rgba(255,255,255,0.2); + -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; + } + + .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); } + + + /* theme "inset-3", "inset-3-dark" */ + + .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); } + + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); } + + .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } + + .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } + + .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } + + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); } + + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } + + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, + .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } + + /* ---------------------------------------- */ diff --git a/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js new file mode 100644 index 000000000..4c9a0b2e5 --- /dev/null +++ b/aspnet-core/services/LINGYUN.Abp.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js @@ -0,0 +1,2458 @@ +/* +== malihu jquery custom scrollbar plugin == +Version: 3.1.5 +Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller +Author: malihu +Author URI: http://manos.malihu.gr +License: MIT License (MIT) +*/ + +/* +Copyright Manos Malihutsakis (email: manos@malihu.gr) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +/* +The code below is fairly long, fully commented and should be normally used in development. +For production, use either the minified jquery.mCustomScrollbar.min.js script or +the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin +and dependencies (minified). +*/ + +(function(factory){ + if(typeof define==="function" && define.amd){ + define(["jquery"],factory); + }else if(typeof module!=="undefined" && module.exports){ + module.exports=factory; + }else{ + factory(jQuery,window,document); + } +}(function($){ +(function(init){ + var _rjs=typeof define==="function" && define.amd, /* RequireJS */ + _njs=typeof module !== "undefined" && module.exports, /* NodeJS */ + _dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */ + _url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"; + if(!_rjs){ + if(_njs){ + require("jquery-mousewheel")($); + }else{ + /* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS + (works when mCustomScrollbar fn is called on window load) */ + $.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E")); + } + } + init(); +}(function(){ + + /* + ---------------------------------------- + PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S) + ---------------------------------------- + */ + + var pluginNS="mCustomScrollbar", + pluginPfx="mCS", + defaultSelector=".mCustomScrollbar", + + + + + + /* + ---------------------------------------- + DEFAULT OPTIONS + ---------------------------------------- + */ + + defaults={ + /* + set element/content width/height programmatically + values: boolean, pixels, percentage + option default + ------------------------------------- + setWidth false + setHeight false + */ + /* + set the initial css top property of content + values: string (e.g. "-100px", "10%" etc.) + */ + setTop:0, + /* + set the initial css left property of content + values: string (e.g. "-100px", "10%" etc.) + */ + setLeft:0, + /* + scrollbar axis (vertical and/or horizontal scrollbars) + values (string): "y", "x", "yx" + */ + axis:"y", + /* + position of scrollbar relative to content + values (string): "inside", "outside" ("outside" requires elements with position:relative) + */ + scrollbarPosition:"inside", + /* + scrolling inertia + values: integer (milliseconds) + */ + scrollInertia:950, + /* + auto-adjust scrollbar dragger length + values: boolean + */ + autoDraggerLength:true, + /* + auto-hide scrollbar when idle + values: boolean + option default + ------------------------------------- + autoHideScrollbar false + */ + /* + auto-expands scrollbar on mouse-over and dragging + values: boolean + option default + ------------------------------------- + autoExpandScrollbar false + */ + /* + always show scrollbar, even when there's nothing to scroll + values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean + */ + alwaysShowScrollbar:0, + /* + scrolling always snaps to a multiple of this number in pixels + values: integer, array ([y,x]) + option default + ------------------------------------- + snapAmount null + */ + /* + when snapping, snap with this number in pixels as an offset + values: integer + */ + snapOffset:0, + /* + mouse-wheel scrolling + */ + mouseWheel:{ + /* + enable mouse-wheel scrolling + values: boolean + */ + enable:true, + /* + scrolling amount in pixels + values: "auto", integer + */ + scrollAmount:"auto", + /* + mouse-wheel scrolling axis + the default scrolling direction when both vertical and horizontal scrollbars are present + values (string): "y", "x" + */ + axis:"y", + /* + prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached + values: boolean + option default + ------------------------------------- + preventDefault null + */ + /* + the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. + values: "auto", integer + "auto" uses the default OS/browser value + */ + deltaFactor:"auto", + /* + normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) + values: boolean + option default + ------------------------------------- + normalizeDelta null + */ + /* + invert mouse-wheel scrolling direction + values: boolean + option default + ------------------------------------- + invert null + */ + /* + the tags that disable mouse-wheel when cursor is over them + */ + disableOver:["select","option","keygen","datalist","textarea"] + }, + /* + scrollbar buttons + */ + scrollButtons:{ + /* + enable scrollbar buttons + values: boolean + option default + ------------------------------------- + enable null + */ + /* + scrollbar buttons scrolling type + values (string): "stepless", "stepped" + */ + scrollType:"stepless", + /* + scrolling amount in pixels + values: "auto", integer + */ + scrollAmount:"auto" + /* + tabindex of the scrollbar buttons + values: false, integer + option default + ------------------------------------- + tabindex null + */ + }, + /* + keyboard scrolling + */ + keyboard:{ + /* + enable scrolling via keyboard + values: boolean + */ + enable:true, + /* + keyboard scrolling type + values (string): "stepless", "stepped" + */ + scrollType:"stepless", + /* + scrolling amount in pixels + values: "auto", integer + */ + scrollAmount:"auto" + }, + /* + enable content touch-swipe scrolling + values: boolean, integer, string (number) + integer values define the axis-specific minimum amount required for scrolling momentum + */ + contentTouchScroll:25, + /* + enable/disable document (default) touch-swipe scrolling + */ + documentTouchScroll:true, + /* + advanced option parameters + */ + advanced:{ + /* + auto-expand content horizontally (for "x" or "yx" axis) + values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method) + option default + ------------------------------------- + autoExpandHorizontalScroll null + */ + /* + auto-scroll to elements with focus + */ + autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", + /* + auto-update scrollbars on content, element or viewport resize + should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. + values: boolean + */ + updateOnContentResize:true, + /* + auto-update scrollbars each time each image inside the element is fully loaded + values: "auto", boolean + */ + updateOnImageLoad:"auto", + /* + auto-update scrollbars based on the amount and size changes of specific selectors + useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size + values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) + a value of true (boolean) will auto-update scrollbars each time any element is changed + option default + ------------------------------------- + updateOnSelectorChange null + */ + /* + extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2") + option default + ------------------------------------- + extraDraggableSelectors null + */ + /* + extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2") + option default + ------------------------------------- + releaseDraggableSelectors null + */ + /* + auto-update timeout + values: integer (milliseconds) + */ + autoUpdateTimeout:60 + }, + /* + scrollbar theme + values: string (see CSS/plugin URI for a list of ready-to-use themes) + */ + theme:"light", + /* + user defined callback functions + */ + callbacks:{ + /* + Available callbacks: + callback default + ------------------------------------- + onCreate null + onInit null + onScrollStart null + onScroll null + onTotalScroll null + onTotalScrollBack null + whileScrolling null + onOverflowY null + onOverflowX null + onOverflowYNone null + onOverflowXNone null + onImageLoad null + onSelectorChange null + onBeforeUpdate null + onUpdate null + */ + onTotalScrollOffset:0, + onTotalScrollBackOffset:0, + alwaysTriggerOffsets:true + } + /* + add scrollbar(s) on all elements matching the current selector, now and in the future + values: boolean, string + string values: "on" (enable), "once" (disable after first invocation), "off" (disable) + liveSelector values: string (selector) + option default + ------------------------------------- + live false + liveSelector null + */ + }, + + + + + + /* + ---------------------------------------- + VARS, CONSTANTS + ---------------------------------------- + */ + + totalInstances=0, /* plugin instances amount */ + liveTimers={}, /* live option timers */ + oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */ + touchActive=false,touchable, /* global touch vars (for touch and pointer events) */ + /* general plugin classes */ + classes=[ + "mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar", + "mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer", + "mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight" + ], + + + + + + /* + ---------------------------------------- + METHODS + ---------------------------------------- + */ + + methods={ + + /* + plugin initialization method + creates the scrollbar(s), plugin data object and options + ---------------------------------------- + */ + + init:function(options){ + + var options=$.extend(true,{},defaults,options), + selector=_selector.call(this); /* validate selector */ + + /* + if live option is enabled, monitor for elements matching the current selector and + apply scrollbar(s) when found (now and in the future) + */ + if(options.live){ + var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */ + $liveSelector=$(liveSelector); /* live selector(s) as jquery object */ + if(options.live==="off"){ + /* + disable live if requested + usage: $(selector).mCustomScrollbar({live:"off"}); + */ + removeLiveTimers(liveSelector); + return; + } + liveTimers[liveSelector]=setTimeout(function(){ + /* call mCustomScrollbar fn on live selector(s) every half-second */ + $liveSelector.mCustomScrollbar(options); + if(options.live==="once" && $liveSelector.length){ + /* disable live after first invocation */ + removeLiveTimers(liveSelector); + } + },500); + }else{ + removeLiveTimers(liveSelector); + } + + /* options backward compatibility (for versions < 3.0.0) and normalization */ + options.setWidth=(options.set_width) ? options.set_width : options.setWidth; + options.setHeight=(options.set_height) ? options.set_height : options.setHeight; + options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis); + options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia; + if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */ + options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false} + } + options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels; + options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta; + options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType); + + _theme(options); /* theme-specific options */ + + /* plugin constructor */ + return $(selector).each(function(){ + + var $this=$(this); + + if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */ + + /* store options and create objects in jquery data */ + $this.data(pluginPfx,{ + idx:++totalInstances, /* instance index */ + opt:options, /* options */ + scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */ + overflowed:null, /* overflowed axis */ + contentReset:{y:null,x:null}, /* object to check when content resets */ + bindEvents:false, /* object to check if events are bound */ + tweenRunning:false, /* object to check if tween is running */ + sequential:{}, /* sequential scrolling object */ + langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */ + cbOffsets:null, /* object to check whether callback offsets always trigger */ + /* + object to check how scrolling events where last triggered + "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) + usage: object.data("mCS").trigger + */ + trigger:null, + /* + object to check for changes in elements in order to call the update method automatically + */ + poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}} + }); + + var d=$this.data(pluginPfx),o=d.opt, + /* HTML data attributes */ + htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme"); + + if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */ + if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */ + if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */ + o.theme=htmlDataTheme; + _theme(o); /* theme-specific options */ + } + + _pluginMarkup.call(this); /* add plugin markup */ + + if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */ + + $("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */ + + methods.update.call(null,$this); /* call the update method */ + + } + + }); + + }, + /* ---------------------------------------- */ + + + + /* + plugin update method + updates content and scrollbar(s) values, events and status + ---------------------------------------- + usage: $(selector).mCustomScrollbar("update"); + */ + + update:function(el,cb){ + + var selector=el || _selector.call(this); /* validate selector */ + + return $(selector).each(function(){ + + var $this=$(this); + + if($this.data(pluginPfx)){ /* check if plugin has initialized */ + + var d=$this.data(pluginPfx),o=d.opt, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; + + if(!mCSB_container.length){return;} + + if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */ + + if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */ + + /* if element was disabled or destroyed, remove class(es) */ + if($this.hasClass(classes[3])){$this.removeClass(classes[3]);} + if($this.hasClass(classes[4])){$this.removeClass(classes[4]);} + + /* css flexbox fix, detect/set max-height */ + mCustomScrollBox.css("max-height","none"); + if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());} + + _expandContentHorizontally.call(this); /* expand content horizontally */ + + if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ + mCSB_container.css("width",_contentWidth(mCSB_container)); + } + + d.overflowed=_overflowed.call(this); /* determine if scrolling is required */ + + _scrollbarVisibility.call(this); /* show/hide scrollbar(s) */ + + /* auto-adjust scrollbar dragger length analogous to content */ + if(o.autoDraggerLength){_setDraggerLength.call(this);} + + _scrollRatio.call(this); /* calculate and store scrollbar to content ratio */ + + _bindEvents.call(this); /* bind scrollbar events */ + + /* reset scrolling position and/or events */ + var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)]; + if(o.axis!=="x"){ /* y/yx axis */ + if(!d.overflowed[0]){ /* y scrolling is not required */ + _resetContentPosition.call(this); /* reset content position */ + if(o.axis==="y"){ + _unbindEvents.call(this); + }else if(o.axis==="yx" && d.overflowed[1]){ + _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); + } + }else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){ + _resetContentPosition.call(this); /* reset content position */ + }else{ /* y scrolling is required */ + _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); + d.contentReset.y=null; + } + } + if(o.axis!=="y"){ /* x/yx axis */ + if(!d.overflowed[1]){ /* x scrolling is not required */ + _resetContentPosition.call(this); /* reset content position */ + if(o.axis==="x"){ + _unbindEvents.call(this); + }else if(o.axis==="yx" && d.overflowed[0]){ + _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); + } + }else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){ + _resetContentPosition.call(this); /* reset content position */ + }else{ /* x scrolling is required */ + _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); + d.contentReset.x=null; + } + } + + /* callbacks: onImageLoad, onSelectorChange, onUpdate */ + if(cb && d){ + if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){ + o.callbacks.onImageLoad.call(this); + }else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){ + o.callbacks.onSelectorChange.call(this); + }else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){ + o.callbacks.onUpdate.call(this); + } + } + + _autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */ + + } + + }); + + }, + /* ---------------------------------------- */ + + + + /* + plugin scrollTo method + triggers a scrolling event to a specific value + ---------------------------------------- + usage: $(selector).mCustomScrollbar("scrollTo",value,options); + */ + + scrollTo:function(val,options){ + + /* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */ + if(typeof val=="undefined" || val==null){return;} + + var selector=_selector.call(this); /* validate selector */ + + return $(selector).each(function(){ + + var $this=$(this); + + if($this.data(pluginPfx)){ /* check if plugin has initialized */ + + var d=$this.data(pluginPfx),o=d.opt, + /* method default options */ + methodDefaults={ + trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */ + scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */ + scrollEasing:"mcsEaseInOut", /* animation easing */ + moveDragger:false, /* move dragger instead of content */ + timeout:60, /* scroll-to delay */ + callbacks:true, /* enable/disable callbacks */ + onStart:true, + onUpdate:true, + onComplete:true + }, + methodOptions=$.extend(true,{},methodDefaults,options), + to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia; + + /* translate yx values to actual scroll-to positions */ + to[0]=_to.call(this,to[0],"y"); + to[1]=_to.call(this,to[1],"x"); + + /* + check if scroll-to value moves the dragger instead of content. + Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.) + */ + if(methodOptions.moveDragger){ + to[0]*=d.scrollRatio.y; + to[1]*=d.scrollRatio.x; + } + + methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden + + setTimeout(function(){ + /* do the scrolling */ + if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */ + methodOptions.dir="y"; + methodOptions.overwrite="all"; + _scrollTo($this,to[0].toString(),methodOptions); + } + if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */ + methodOptions.dir="x"; + methodOptions.overwrite="none"; + _scrollTo($this,to[1].toString(),methodOptions); + } + },methodOptions.timeout); + + } + + }); + + }, + /* ---------------------------------------- */ + + + + /* + plugin stop method + stops scrolling animation + ---------------------------------------- + usage: $(selector).mCustomScrollbar("stop"); + */ + stop:function(){ + + var selector=_selector.call(this); /* validate selector */ + + return $(selector).each(function(){ + + var $this=$(this); + + if($this.data(pluginPfx)){ /* check if plugin has initialized */ + + _stop($this); + + } + + }); + + }, + /* ---------------------------------------- */ + + + + /* + plugin disable method + temporarily disables the scrollbar(s) + ---------------------------------------- + usage: $(selector).mCustomScrollbar("disable",reset); + reset (boolean): resets content position to 0 + */ + disable:function(r){ + + var selector=_selector.call(this); /* validate selector */ + + return $(selector).each(function(){ + + var $this=$(this); + + if($this.data(pluginPfx)){ /* check if plugin has initialized */ + + var d=$this.data(pluginPfx); + + _autoUpdate.call(this,"remove"); /* remove automatic updating */ + + _unbindEvents.call(this); /* unbind events */ + + if(r){_resetContentPosition.call(this);} /* reset content position */ + + _scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */ + + $this.addClass(classes[3]); /* add disable class */ + + } + + }); + + }, + /* ---------------------------------------- */ + + + + /* + plugin destroy method + completely removes the scrollbar(s) and returns the element to its original state + ---------------------------------------- + usage: $(selector).mCustomScrollbar("destroy"); + */ + destroy:function(){ + + var selector=_selector.call(this); /* validate selector */ + + return $(selector).each(function(){ + + var $this=$(this); + + if($this.data(pluginPfx)){ /* check if plugin has initialized */ + + var d=$this.data(pluginPfx),o=d.opt, + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + scrollbar=$(".mCSB_"+d.idx+"_scrollbar"); + + if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */ + + _autoUpdate.call(this,"remove"); /* remove automatic updating */ + + _unbindEvents.call(this); /* unbind events */ + + _resetContentPosition.call(this); /* reset content position */ + + $this.removeData(pluginPfx); /* remove plugin data object */ + + _delete(this,"mcs"); /* delete callbacks object */ + + /* remove plugin markup */ + scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */ + mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */ + mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */ + /* remove plugin classes from the element and add destroy class */ + $this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]); + + } + + }); + + } + /* ---------------------------------------- */ + + }, + + + + + + /* + ---------------------------------------- + FUNCTIONS + ---------------------------------------- + */ + + /* validates selector (if selector is invalid or undefined uses the default one) */ + _selector=function(){ + return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this; + }, + /* -------------------- */ + + + /* changes options according to theme */ + _theme=function(obj){ + var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"], + nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"], + disabledScrollButtonsThemes=["minimal","minimal-dark"], + enabledAutoHideScrollbarThemes=["minimal","minimal-dark"], + scrollbarPositionOutsideThemes=["minimal","minimal-dark"]; + obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength; + obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar; + obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable; + obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar; + obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition; + }, + /* -------------------- */ + + + /* live option timers removal */ + removeLiveTimers=function(selector){ + if(liveTimers[selector]){ + clearTimeout(liveTimers[selector]); + _delete(liveTimers,selector); + } + }, + /* -------------------- */ + + + /* normalizes axis option to valid values: "y", "x", "yx" */ + _findAxis=function(val){ + return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y"; + }, + /* -------------------- */ + + + /* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */ + _findScrollButtonsType=function(val){ + return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless"; + }, + /* -------------------- */ + + + /* generates plugin markup */ + _pluginMarkup=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "", + scrollbar=["
    ","
    "], + wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical", + scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0], + contentWrapper=o.axis==="yx" ? "
    " : "", + autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "", + scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : ""; + if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */ + if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */ + o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */ + $this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("
    "); + var mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"); + if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ + mCSB_container.css("width",_contentWidth(mCSB_container)); + } + if(o.scrollbarPosition==="outside"){ + if($this.css("position")==="static"){ /* requires elements with non-static position */ + $this.css("position","relative"); + } + $this.css("overflow","visible"); + mCustomScrollBox.addClass("mCSB_outside").after(scrollbars); + }else{ + mCustomScrollBox.addClass("mCSB_inside").append(scrollbars); + mCSB_container.wrap(contentWrapper); + } + _scrollButtons.call(this); /* add scrollbar buttons */ + /* minimum dragger length */ + var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; + mCSB_dragger[0].css("min-height",mCSB_dragger[0].height()); + mCSB_dragger[1].css("min-width",mCSB_dragger[1].width()); + }, + /* -------------------- */ + + + /* calculates content width */ + _contentWidth=function(el){ + var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width(); + return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%"; + }, + /* -------------------- */ + + + /* expands content horizontally */ + _expandContentHorizontally=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + mCSB_container=$("#mCSB_"+d.idx+"_container"); + if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){ + /* calculate scrollWidth */ + mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"}); + var w=Math.ceil(mCSB_container[0].scrollWidth); + if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){ + mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"}); + }else{ + /* + wrap content with an infinite width div and set its position to absolute and width to auto. + Setting width to auto before calculating the actual width is important! + We must let the browser set the width as browser zoom values are impossible to calculate. + */ + mCSB_container.css({"overflow-x":"inherit","position":"absolute"}) + .wrap("
    ") + .css({ /* set actual width, original position and un-wrap */ + /* + get the exact width (with decimals) and then round-up. + Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width + */ + "width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)), + "min-width":"100%", + "position":"relative" + }).unwrap(); + } + } + }, + /* -------------------- */ + + + /* adds scrollbar buttons */ + _scrollButtons=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"), + tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'", + btnHTML=[ + "", + "", + "", + "" + ], + btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]]; + if(o.scrollButtons.enable){ + mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]); + } + }, + /* -------------------- */ + + + /* auto-adjusts scrollbar dragger length */ + _setDraggerLength=function(){ + var $this=$(this),d=$this.data(pluginPfx), + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], + ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)], + l=[ + parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()), + parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width()) + ], + h=oldIE && (l[1]contentHeight){contentHeight=h;} + if(w>contentWidth){contentWidth=w;} + return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]; + }, + /* -------------------- */ + + + /* resets content position to 0 */ + _resetContentPosition=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; + _stop($this); /* stop any current scrolling before resetting */ + if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */ + mCSB_dragger[0].add(mCSB_container).css("top",0); + _scrollTo($this,"_resetY"); + } + if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */ + var cx=dx=0; + if(d.langDir==="rtl"){ /* adjust left position for rtl direction */ + cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false); + dx=Math.abs(cx/d.scrollRatio.x); + } + mCSB_container.css("left",cx); + mCSB_dragger[1].css("left",dx); + _scrollTo($this,"_resetX"); + } + }, + /* -------------------- */ + + + /* binds scrollbar events */ + _bindEvents=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt; + if(!d.bindEvents){ /* check if events are already bound */ + _draggable.call(this); + if(o.contentTouchScroll){_contentDraggable.call(this);} + _selectable.call(this); + if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */ + function _mwt(){ + mousewheelTimeout=setTimeout(function(){ + if(!$.event.special.mousewheel){ + _mwt(); + }else{ + clearTimeout(mousewheelTimeout); + _mousewheel.call($this[0]); + } + },100); + } + var mousewheelTimeout; + _mwt(); + } + _draggerRail.call(this); + _wrapperScroll.call(this); + if(o.advanced.autoScrollOnFocus){_focus.call(this);} + if(o.scrollButtons.enable){_buttons.call(this);} + if(o.keyboard.enable){_keyboard.call(this);} + d.bindEvents=true; + } + }, + /* -------------------- */ + + + /* unbinds scrollbar events */ + _unbindEvents=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + namespace=pluginPfx+"_"+d.idx, + sb=".mCSB_"+d.idx+"_scrollbar", + sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"), + mCSB_container=$("#mCSB_"+d.idx+"_container"); + if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));} + if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));} + if(d.bindEvents){ /* check if events are bound */ + /* unbind namespaced events from document/selectors */ + $(document).add($(!_canAccessIFrame() || top.document)).unbind("."+namespace); + sel.each(function(){ + $(this).unbind("."+namespace); + }); + /* clear and delete timeouts/objects */ + clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout"); + clearTimeout(d.sequential.step); _delete(d.sequential,"step"); + clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout"); + d.bindEvents=false; + } + }, + /* -------------------- */ + + + /* toggles scrollbar visibility */ + _scrollbarVisibility=function(disabled){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"), + content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"), + scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")], + mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")]; + if(o.axis!=="x"){ + if(d.overflowed[0] && !disabled){ + scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block"); + content.removeClass(classes[8]+" "+classes[10]); + }else{ + if(o.alwaysShowScrollbar){ + if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");} + content.removeClass(classes[10]); + }else{ + scrollbar[0].css("display","none"); + content.addClass(classes[10]); + } + content.addClass(classes[8]); + } + } + if(o.axis!=="y"){ + if(d.overflowed[1] && !disabled){ + scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block"); + content.removeClass(classes[9]+" "+classes[11]); + }else{ + if(o.alwaysShowScrollbar){ + if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");} + content.removeClass(classes[11]); + }else{ + scrollbar[1].css("display","none"); + content.addClass(classes[11]); + } + content.addClass(classes[9]); + } + } + if(!d.overflowed[0] && !d.overflowed[1]){ + $this.addClass(classes[5]); + }else{ + $this.removeClass(classes[5]); + } + }, + /* -------------------- */ + + + /* returns input coordinates of pointer, touch and mouse events (relative to document) */ + _coordinates=function(e){ + var t=e.type,o=e.target.ownerDocument!==document && frameElement!==null ? [$(frameElement).offset().top,$(frameElement).offset().left] : null, + io=_canAccessIFrame() && e.target.ownerDocument!==top.document && frameElement!==null ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0]; + switch(t){ + case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": + return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false]; + break; + case "touchstart": case "touchmove": case "touchend": + var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], + touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length; + return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1]; + break; + default: + return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false]; + } + }, + /* -------------------- */ + + + /* + SCROLLBAR DRAG EVENTS + scrolls content via scrollbar dragging + */ + _draggable=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + namespace=pluginPfx+"_"+d.idx, + draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"], + mCSB_container=$("#mCSB_"+d.idx+"_container"), + mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]), + draggable,dragY,dragX, + rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger, + eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document); + mCSB_dragger.bind("contextmenu."+namespace,function(e){ + e.preventDefault(); //prevent right click + }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ + e.stopImmediatePropagation(); + e.preventDefault(); + if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ + touchActive=true; + if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */ + _iframe.call(mCSB_container,false); /* enable scrollbar dragging over iframes by disabling their events */ + _stop($this); + draggable=$(this); + var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, + h=draggable.height()+offset.top,w=draggable.width()+offset.left; + if(y0 && x0){ + dragY=y; + dragX=x; + } + _onDragClasses(draggable,"active",o.autoExpandScrollbar); + }).bind("touchmove."+namespace,function(e){ + e.stopImmediatePropagation(); + e.preventDefault(); + var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; + _drag(dragY,dragX,y,x); + }); + $(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){ + if(draggable){ + var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; + if(dragY===y && dragX===x){return;} /* has it really moved? */ + _drag(dragY,dragX,y,x); + } + }).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ + if(draggable){ + _onDragClasses(draggable,"active",o.autoExpandScrollbar); + draggable=null; + } + touchActive=false; + if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */ + _iframe.call(mCSB_container,true); /* enable iframes events */ + }); + function _drag(dragY,dragX,y,x){ + mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0; + if(draggable.attr("id")===draggerId[1]){ + var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x; + }else{ + var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y; + } + _scrollTo($this,to.toString(),{dir:dir,drag:true}); + } + }, + /* -------------------- */ + + + /* + TOUCH SWIPE EVENTS + scrolls content via touch swipe + Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices + */ + _contentDraggable=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + namespace=pluginPfx+"_"+d.idx, + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], + draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount, + durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag, + iframe=mCSB_container.find("iframe"), + events=[ + "touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start + "touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move + "touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end + ], + touchAction=document.body.style.touchAction!==undefined && document.body.style.touchAction!==""; + mCSB_container.bind(events[0],function(e){ + _onTouchstart(e); + }).bind(events[1],function(e){ + _onTouchmove(e); + }); + mCustomScrollBox.bind(events[0],function(e){ + _onTouchstart2(e); + }).bind(events[2],function(e){ + _onTouchend(e); + }); + if(iframe.length){ + iframe.each(function(){ + $(this).bind("load",function(){ + /* bind events on accessible iframes */ + if(_canAccessIFrame(this)){ + $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ + _onTouchstart(e); + _onTouchstart2(e); + }).bind(events[1],function(e){ + _onTouchmove(e); + }).bind(events[2],function(e){ + _onTouchend(e); + }); + } + }); + }); + } + function _onTouchstart(e){ + if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} + touchable=1; touchDrag=0; docDrag=0; draggable=1; + $this.removeClass("mCS_touch_action"); + var offset=mCSB_container.offset(); + dragY=_coordinates(e)[0]-offset.top; + dragX=_coordinates(e)[1]-offset.left; + touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]; + } + function _onTouchmove(e){ + if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} + if(!o.documentTouchScroll){e.preventDefault();} + e.stopImmediatePropagation(); + if(docDrag && !touchDrag){return;} + if(draggable){ + runningTime=_getTime(); + var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, + easing="mcsLinearOut"; + touchMoveY.push(y); + touchMoveX.push(x); + touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]); + if(d.overflowed[0]){ + var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), + prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*20 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*230){return;} + speed=1000/(endTime-startTime); + var easing="mcsEaseOut",slow=speed<2.5, + diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0]; + distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX]; + var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])]; + speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed]; + var a=[ + Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])), + Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1])) + ]; + amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null]; + durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia]; + var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */ + amount[0]=absDistance[0]>md ? amount[0] : 0; + amount[1]=absDistance[1]>md ? amount[1] : 0; + if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);} + if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);} + } + function _m(ds,s){ + var r=[s*1.5,s*2,s/1.5,s/2]; + if(ds>90){ + return s>4 ? r[0] : r[3]; + }else if(ds>60){ + return s>3 ? r[3] : r[2]; + }else if(ds>30){ + return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2]; + }else{ + return s>8 ? s : r[3]; + } + } + function _drag(amount,dur,easing,dir,overwrite,drag){ + if(!amount){return;} + _scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag}); + } + }, + /* -------------------- */ + + + /* + SELECT TEXT EVENTS + scrolls content when text is selected + */ + _selectable=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, + namespace=pluginPfx+"_"+d.idx, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(), + action; + mCSB_container.bind("mousedown."+namespace,function(e){ + if(touchable){return;} + if(!action){action=1; touchActive=true;} + }).add(document).bind("mousemove."+namespace,function(e){ + if(!touchable && action && _sel()){ + var offset=mCSB_container.offset(), + y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft; + if(y>0 && y0 && xwrapper.height()){ + _seq("on",40); + } + } + if(o.axis!=="y" && d.overflowed[1]){ + if(x<0){ + _seq("on",37); + }else if(x>wrapper.width()){ + _seq("on",39); + } + } + } + } + }).bind("mouseup."+namespace+" dragend."+namespace,function(e){ + if(touchable){return;} + if(action){action=0; _seq("off",null);} + touchActive=false; + }); + function _sel(){ + return window.getSelection ? window.getSelection().toString() : + document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0; + } + function _seq(a,c,s){ + seq.type=s && action ? "stepped" : "stepless"; + seq.scrollAmount=10; + _sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null); + } + }, + /* -------------------- */ + + + /* + MOUSE WHEEL EVENT + scrolls content via mouse-wheel + via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel) + */ + _mousewheel=function(){ + if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + namespace=pluginPfx+"_"+d.idx, + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], + iframe=$("#mCSB_"+d.idx+"_container").find("iframe"); + if(iframe.length){ + iframe.each(function(){ + $(this).bind("load",function(){ + /* bind events on accessible iframes */ + if(_canAccessIFrame(this)){ + $(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){ + _onMousewheel(e,delta); + }); + } + }); + }); + } + mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){ + _onMousewheel(e,delta); + }); + function _onMousewheel(e,delta){ + _stop($this); + if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */ + var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100, + dur=o.scrollInertia; + if(o.axis==="x" || o.mouseWheel.axis==="x"){ + var dir="x", + px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)], + amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0], + contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft), + draggerPos=mCSB_dragger[1][0].offsetLeft, + limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), + dlt=o.mouseWheel.axis==="y" ? (e.deltaY || delta) : e.deltaX; + }else{ + var dir="y", + px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)], + amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0], + contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop), + draggerPos=mCSB_dragger[0][0].offsetTop, + limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), + dlt=e.deltaY || delta; + } + if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;} + if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;} + if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;} + if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){ + e.stopImmediatePropagation(); + e.preventDefault(); + } + if(e.deltaFactor<5 && !o.mouseWheel.normalizeDelta){ + //very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly + amount=e.deltaFactor; dur=17; + } + _scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur}); + } + }, + /* -------------------- */ + + + /* checks if iframe can be accessed */ + _canAccessIFrameCache=new Object(), + _canAccessIFrame=function(iframe){ + var result=false,cacheKey=false,html=null; + if(iframe===undefined){ + cacheKey="#empty"; + }else if($(iframe).attr("id")!==undefined){ + cacheKey=$(iframe).attr("id"); + } + if(cacheKey!==false && _canAccessIFrameCache[cacheKey]!==undefined){ + return _canAccessIFrameCache[cacheKey]; + } + if(!iframe){ + try{ + var doc=top.document; + html=doc.body.innerHTML; + }catch(err){/* do nothing */} + result=(html!==null); + }else{ + try{ + var doc=iframe.contentDocument || iframe.contentWindow.document; + html=doc.body.innerHTML; + }catch(err){/* do nothing */} + result=(html!==null); + } + if(cacheKey!==false){_canAccessIFrameCache[cacheKey]=result;} + return result; + }, + /* -------------------- */ + + + /* switches iframe's pointer-events property (drag, mousewheel etc. over cross-domain iframes) */ + _iframe=function(evt){ + var el=this.find("iframe"); + if(!el.length){return;} /* check if content contains iframes */ + var val=!evt ? "none" : "auto"; + el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */ + }, + /* -------------------- */ + + + /* disables mouse-wheel when hovering specific elements like select, datalist etc. */ + _disableMousewheel=function(el,target){ + var tag=target.nodeName.toLowerCase(), + tags=el.data(pluginPfx).opt.mouseWheel.disableOver, + /* elements that require focus */ + focusTags=["select","textarea"]; + return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus")); + }, + /* -------------------- */ + + + /* + DRAGGER RAIL CLICK EVENT + scrolls content via dragger rail + */ + _draggerRail=function(){ + var $this=$(this),d=$this.data(pluginPfx), + namespace=pluginPfx+"_"+d.idx, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(), + mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]), + clickable; + mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ + touchActive=true; + if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;} + }).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ + touchActive=false; + }).bind("click."+namespace,function(e){ + if(!clickable){return;} + clickable=0; + if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){ + _stop($this); + var el=$(this),mCSB_dragger=el.find(".mCSB_dragger"); + if(el.parent(".mCSB_scrollTools_horizontal").length>0){ + if(!d.overflowed[1]){return;} + var dir="x", + clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1, + to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9)); + }else{ + if(!d.overflowed[0]){return;} + var dir="y", + clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1, + to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9)); + } + _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); + } + }); + }, + /* -------------------- */ + + + /* + FOCUS EVENT + scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.) + */ + _focus=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + namespace=pluginPfx+"_"+d.idx, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(); + mCSB_container.bind("focusin."+namespace,function(e){ + var el=$(document.activeElement), + nested=mCSB_container.find(".mCustomScrollBox").length, + dur=0; + if(!el.is(o.advanced.autoScrollOnFocus)){return;} + _stop($this); + clearTimeout($this[0]._focusTimeout); + $this[0]._focusTimer=nested ? (dur+17)*nested : 0; + $this[0]._focusTimeout=setTimeout(function(){ + var to=[_childPos(el)[0],_childPos(el)[1]], + contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], + isVisible=[ + (contentPos[0]+to[0]>=0 && contentPos[0]+to[0]=0 && contentPos[0]+to[1]a"); + btn.bind("contextmenu."+namespace,function(e){ + e.preventDefault(); //prevent right click + }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){ + e.preventDefault(); + if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ + var btnClass=$(this).attr("class"); + seq.type=o.scrollButtons.scrollType; + switch(e.type){ + case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": + if(seq.type==="stepped"){return;} + touchActive=true; + d.tweenRunning=false; + _seq("on",btnClass); + break; + case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": + case "mouseout": case "pointerout": case "MSPointerOut": + if(seq.type==="stepped"){return;} + touchActive=false; + if(seq.dir){_seq("off",btnClass);} + break; + case "click": + if(seq.type!=="stepped" || d.tweenRunning){return;} + _seq("on",btnClass); + break; + } + function _seq(a,c){ + seq.scrollAmount=o.scrollButtons.scrollAmount; + _sequentialScroll($this,a,c); + } + }); + }, + /* -------------------- */ + + + /* + KEYBOARD EVENTS + scrolls content via keyboard + Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End + */ + _keyboard=function(){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, + namespace=pluginPfx+"_"+d.idx, + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(), + editables="input,textarea,select,datalist,keygen,[contenteditable='true']", + iframe=mCSB_container.find("iframe"), + events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace]; + if(iframe.length){ + iframe.each(function(){ + $(this).bind("load",function(){ + /* bind events on accessible iframes */ + if(_canAccessIFrame(this)){ + $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ + _onKeyboard(e); + }); + } + }); + }); + } + mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){ + _onKeyboard(e); + }); + function _onKeyboard(e){ + switch(e.type){ + case "blur": + if(d.tweenRunning && seq.dir){_seq("off",null);} + break; + case "keydown": case "keyup": + var code=e.keyCode ? e.keyCode : e.which,action="on"; + if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){ + /* up (38), down (40), left (37), right (39) arrows */ + if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;} + if(e.type==="keyup"){action="off";} + if(!$(document.activeElement).is(editables)){ + e.preventDefault(); + e.stopImmediatePropagation(); + _seq(action,code); + } + }else if(code===33 || code===34){ + /* PgUp (33), PgDn (34) */ + if(d.overflowed[0] || d.overflowed[1]){ + e.preventDefault(); + e.stopImmediatePropagation(); + } + if(e.type==="keyup"){ + _stop($this); + var keyboardDir=code===34 ? -1 : 1; + if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ + var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9)); + }else{ + var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9)); + } + _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); + } + }else if(code===35 || code===36){ + /* End (35), Home (36) */ + if(!$(document.activeElement).is(editables)){ + if(d.overflowed[0] || d.overflowed[1]){ + e.preventDefault(); + e.stopImmediatePropagation(); + } + if(e.type==="keyup"){ + if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ + var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0; + }else{ + var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0; + } + _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); + } + } + } + break; + } + function _seq(a,c){ + seq.type=o.keyboard.scrollType; + seq.scrollAmount=o.keyboard.scrollAmount; + if(seq.type==="stepped" && d.tweenRunning){return;} + _sequentialScroll($this,a,c); + } + } + }, + /* -------------------- */ + + + /* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */ + _sequentialScroll=function(el,action,trigger,e,s){ + var d=el.data(pluginPfx),o=d.opt,seq=d.sequential, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + once=seq.type==="stepped" ? true : false, + steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */ + steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia; + switch(action){ + case "on": + seq.dir=[ + (trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"), + (trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1) + ]; + _stop(el); + if(_isNumeric(trigger) && seq.type==="stepped"){return;} + _on(once); + break; + case "off": + _off(); + if(once || (d.tweenRunning && seq.dir)){ + _on(true); + } + break; + } + + /* starts sequence */ + function _on(once){ + if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */ + var c=seq.type!=="stepped", /* continuous scrolling */ + t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */ + m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */ + contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)], + ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x], + amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)), + px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)), + to=seq.scrollAmount!=="auto" ? px : amount, + easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut", + onComplete=!once ? false : true; + if(once && t<17){ + to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0]; + } + _scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete}); + if(once){ + seq.dir=false; + return; + } + clearTimeout(seq.step); + seq.step=setTimeout(function(){ + _on(); + },t); + } + /* stops sequence */ + function _off(){ + clearTimeout(seq.step); + _delete(seq,"step"); + _stop(el); + } + }, + /* -------------------- */ + + + /* returns a yx array from value */ + _arr=function(val){ + var o=$(this).data(pluginPfx).opt,vals=[]; + if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */ + /* check if value is object or array, its length and create an array with yx values */ + if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */ + vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val; + vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val; + }else{ /* array value (e.g. [100,100]) */ + vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null]; + } + /* check if array values are anonymous functions */ + if(typeof vals[0]==="function"){vals[0]=vals[0]();} + if(typeof vals[1]==="function"){vals[1]=vals[1]();} + return vals; + }, + /* -------------------- */ + + + /* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */ + _to=function(val,dir){ + if(val==null || typeof val=="undefined"){return;} + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(), + t=typeof val; + if(!dir){dir=o.axis==="x" ? "x" : "y";} + var contentLength=dir==="x" ? mCSB_container.outerWidth(false)-wrapper.width() : mCSB_container.outerHeight(false)-wrapper.height(), + contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop, + cssProp=dir==="x" ? "left" : "top"; + switch(t){ + case "function": /* this currently is not used. Consider removing it */ + return val(); + break; + case "object": /* js/jquery object */ + var obj=val.jquery ? val : $(val); + if(!obj.length){return;} + return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; + break; + case "string": case "number": + if(_isNumeric(val)){ /* numeric value */ + return Math.abs(val); + }else if(val.indexOf("%")!==-1){ /* percentage value */ + return Math.abs(contentLength*parseInt(val)/100); + }else if(val.indexOf("-=")!==-1){ /* decrease value */ + return Math.abs(contentPos-parseInt(val.split("-=")[1])); + }else if(val.indexOf("+=")!==-1){ /* inrease value */ + var p=(contentPos+parseInt(val.split("+=")[1])); + return p>=0 ? 0 : Math.abs(p); + }else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */ + return Math.abs(val.split("px")[0]); + }else{ + if(val==="top" || val==="left"){ /* special strings */ + return 0; + }else if(val==="bottom"){ + return Math.abs(wrapper.height()-mCSB_container.outerHeight(false)); + }else if(val==="right"){ + return Math.abs(wrapper.width()-mCSB_container.outerWidth(false)); + }else if(val==="first" || val==="last"){ + var obj=mCSB_container.find(":"+val); + return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; + }else{ + if($(val).length){ /* jquery selector */ + return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0]; + }else{ /* other values (e.g. "100em") */ + mCSB_container.css(cssProp,val); + methods.update.call(null,$this[0]); + return; + } + } + } + break; + } + }, + /* -------------------- */ + + + /* calls the update method automatically */ + _autoUpdate=function(rem){ + var $this=$(this),d=$this.data(pluginPfx),o=d.opt, + mCSB_container=$("#mCSB_"+d.idx+"_container"); + if(rem){ + /* + removes autoUpdate timer + usage: _autoUpdate.call(this,"remove"); + */ + clearTimeout(mCSB_container[0].autoUpdate); + _delete(mCSB_container[0],"autoUpdate"); + return; + } + upd(); + function upd(){ + clearTimeout(mCSB_container[0].autoUpdate); + if($this.parents("html").length===0){ + /* check element in dom tree */ + $this=null; + return; + } + mCSB_container[0].autoUpdate=setTimeout(function(){ + /* update on specific selector(s) length and size change */ + if(o.advanced.updateOnSelectorChange){ + d.poll.change.n=sizesSum(); + if(d.poll.change.n!==d.poll.change.o){ + d.poll.change.o=d.poll.change.n; + doUpd(3); + return; + } + } + /* update on main element and scrollbar size changes */ + if(o.advanced.updateOnContentResize){ + d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth; + if(d.poll.size.n!==d.poll.size.o){ + d.poll.size.o=d.poll.size.n; + doUpd(1); + return; + } + } + /* update on image load */ + if(o.advanced.updateOnImageLoad){ + if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content + d.poll.img.n=mCSB_container.find("img").length; + if(d.poll.img.n!==d.poll.img.o){ + d.poll.img.o=d.poll.img.n; + mCSB_container.find("img").each(function(){ + imgLoader(this); + }); + return; + } + } + } + if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();} + },o.advanced.autoUpdateTimeout); + } + /* a tiny image loader */ + function imgLoader(el){ + if($(el).hasClass(classes[2])){doUpd(); return;} + var img=new Image(); + function createDelegate(contextObject,delegateMethod){ + return function(){return delegateMethod.apply(contextObject,arguments);} + } + function imgOnLoad(){ + this.onload=null; + $(el).addClass(classes[2]); + doUpd(2); + } + img.onload=createDelegate(img,imgOnLoad); + img.src=el.src; + } + /* returns the total height and width sum of all elements matching the selector */ + function sizesSum(){ + if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";} + var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange); + if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});} + return total; + } + /* calls the update method */ + function doUpd(cb){ + clearTimeout(mCSB_container[0].autoUpdate); + methods.update.call(null,$this[0],cb); + } + }, + /* -------------------- */ + + + /* snaps scrolling to a multiple of a pixels number */ + _snapAmount=function(to,amount,offset){ + return (Math.round(to/amount)*amount-offset); + }, + /* -------------------- */ + + + /* stops content and scrollbar animations */ + _stop=function(el){ + var d=el.data(pluginPfx), + sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal"); + sel.each(function(){ + _stopTween.call(this); + }); + }, + /* -------------------- */ + + + /* + ANIMATES CONTENT + This is where the actual scrolling happens + */ + _scrollTo=function(el,to,options){ + var d=el.data(pluginPfx),o=d.opt, + defaults={ + trigger:"internal", + dir:"y", + scrollEasing:"mcsEaseOut", + drag:false, + dur:o.scrollInertia, + overwrite:"all", + callbacks:true, + onStart:true, + onUpdate:true, + onComplete:true + }, + options=$.extend(defaults,options), + dur=[options.dur,(options.drag ? 0 : options.dur)], + mCustomScrollBox=$("#mCSB_"+d.idx), + mCSB_container=$("#mCSB_"+d.idx+"_container"), + wrapper=mCSB_container.parent(), + totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0], + totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0]; + d.trigger=options.trigger; + if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */ + $(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible"); + wrapper.scrollTop(0).scrollLeft(0); + } + if(to==="_resetY" && !d.contentReset.y){ + /* callbacks: onOverflowYNone */ + if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);} + d.contentReset.y=1; + } + if(to==="_resetX" && !d.contentReset.x){ + /* callbacks: onOverflowXNone */ + if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);} + d.contentReset.x=1; + } + if(to==="_resetY" || to==="_resetX"){return;} + if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){ + /* callbacks: onOverflowY */ + if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);} + d.contentReset.x=null; + } + if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){ + /* callbacks: onOverflowX */ + if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);} + d.contentReset.x=null; + } + if(o.snapAmount){ /* scrolling snapping */ + var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0]; + to=_snapAmount(to,snapAmount,o.snapOffset); + } + switch(options.dir){ + case "x": + var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"), + property="left", + contentPos=mCSB_container[0].offsetLeft, + limit=[ + mCustomScrollBox.width()-mCSB_container.outerWidth(false), + mCSB_dragger.parent().width()-mCSB_dragger.width() + ], + scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)], + tso=totalScrollOffsets[1], + tsbo=totalScrollBackOffsets[1], + totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0, + totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0; + break; + case "y": + var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"), + property="top", + contentPos=mCSB_container[0].offsetTop, + limit=[ + mCustomScrollBox.height()-mCSB_container.outerHeight(false), + mCSB_dragger.parent().height()-mCSB_dragger.height() + ], + scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)], + tso=totalScrollOffsets[0], + tsbo=totalScrollBackOffsets[0], + totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0, + totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0; + break; + } + if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){ + scrollTo=[0,0]; + }else if(scrollTo[1]>=limit[1]){ + scrollTo=[limit[0],limit[1]]; + }else{ + scrollTo[0]=-scrollTo[0]; + } + if(!el[0].mcs){ + _mcs(); /* init mcs object (once) to make it available before callbacks */ + if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */ + } + clearTimeout(mCSB_container[0].onCompleteTimeout); + _tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing); + if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;} + _tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{ + onStart:function(){ + if(options.callbacks && options.onStart && !d.tweenRunning){ + /* callbacks: onScrollStart */ + if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);} + d.tweenRunning=true; + _onDragClasses(mCSB_dragger); + d.cbOffsets=_cbOffsets(); + } + },onUpdate:function(){ + if(options.callbacks && options.onUpdate){ + /* callbacks: whileScrolling */ + if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);} + } + },onComplete:function(){ + if(options.callbacks && options.onComplete){ + if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);} + var t=mCSB_container[0].idleTimer || 0; + mCSB_container[0].onCompleteTimeout=setTimeout(function(){ + /* callbacks: onScroll, onTotalScroll, onTotalScrollBack */ + if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);} + if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);} + if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);} + d.tweenRunning=false; + mCSB_container[0].idleTimer=0; + _onDragClasses(mCSB_dragger,"hide"); + },t); + } + } + }); + /* checks if callback function exists */ + function _cb(cb){ + return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function"; + } + /* checks whether callback offsets always trigger */ + function _cbOffsets(){ + return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo]; + } + /* + populates object with useful values for the user + values: + content: this.mcs.content + content top position: this.mcs.top + content left position: this.mcs.left + dragger top position: this.mcs.draggerTop + dragger left position: this.mcs.draggerLeft + scrolling y percentage: this.mcs.topPct + scrolling x percentage: this.mcs.leftPct + scrolling direction: this.mcs.direction + */ + function _mcs(){ + var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */ + dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */ + cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */ + pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */ + el[0].mcs={ + content:mCSB_container, /* original content wrapper as jquery object */ + top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1], + topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])), + direction:options.dir + }; + /* + this refers to the original element containing the scrollbar(s) + usage: this.mcs.top, this.mcs.leftPct etc. + */ + } + }, + /* -------------------- */ + + + /* + CUSTOM JAVASCRIPT ANIMATION TWEEN + Lighter and faster than jquery animate() and css transitions + Animates top/left properties and includes easings + */ + _tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){ + if(!el._mTween){el._mTween={top:{},left:{}};} + var callbacks=callbacks || {}, + onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){}, + startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop]; + if(prop==="left"){from=el.offsetLeft;} + var diff=to-from; + tobj.stop=0; + if(overwrite!=="none"){_cancelTween();} + _startTween(); + function _step(){ + if(tobj.stop){return;} + if(!progress){onStart.call();} + progress=_getTime()-startTime; + _tween(); + if(progress>=tobj.time){ + tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1; + if(tobj.time0){ + tobj.currVal=_ease(tobj.time,from,diff,duration,easing); + elStyle[prop]=Math.round(tobj.currVal)+"px"; + }else{ + elStyle[prop]=to+"px"; + } + onUpdate.call(); + } + function _startTween(){ + _delay=1000/60; + tobj.time=progress+_delay; + _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame; + tobj.id=_request(_step); + } + function _cancelTween(){ + if(tobj.id==null){return;} + if(!window.requestAnimationFrame){clearTimeout(tobj.id); + }else{window.cancelAnimationFrame(tobj.id);} + tobj.id=null; + } + function _ease(t,b,c,d,type){ + switch(type){ + case "linear": case "mcsLinear": + return c*t/d + b; + break; + case "mcsLinearOut": + t/=d; t--; return c * Math.sqrt(1 - t*t) + b; + break; + case "easeInOutSmooth": + t/=d/2; + if(t<1) return c/2*t*t + b; + t--; + return -c/2 * (t*(t-2) - 1) + b; + break; + case "easeInOutStrong": + t/=d/2; + if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b; + t--; + return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b; + break; + case "easeInOut": case "mcsEaseInOut": + t/=d/2; + if(t<1) return c/2*t*t*t + b; + t-=2; + return c/2*(t*t*t + 2) + b; + break; + case "easeOutSmooth": + t/=d; t--; + return -c * (t*t*t*t - 1) + b; + break; + case "easeOutStrong": + return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b; + break; + case "easeOut": case "mcsEaseOut": default: + var ts=(t/=d)*t,tc=ts*t; + return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t); + } + } + }, + /* -------------------- */ + + + /* returns current time */ + _getTime=function(){ + if(window.performance && window.performance.now){ + return window.performance.now(); + }else{ + if(window.performance && window.performance.webkitNow){ + return window.performance.webkitNow(); + }else{ + if(Date.now){return Date.now();}else{return new Date().getTime();} + } + } + }, + /* -------------------- */ + + + /* stops a tween */ + _stopTween=function(){ + var el=this; + if(!el._mTween){el._mTween={top:{},left:{}};} + var props=["top","left"]; + for(var i=0; i
    - - - - Logout - - -

    @CurrentUser.UserName

    -
    @CurrentUser.Email
    -
    - Roles: @CurrentUser.Roles.JoinAsString(", ") -
    - Claims:
    - @Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").JoinAsString("
    ")) -
    -
    - -
    -} - -@if (!CurrentUser.IsAuthenticated) -{ -
    -

    - Login -
    -} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Index.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Index.cshtml.cs deleted file mode 100644 index 7e54f99fd..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Index.cshtml.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; - -namespace LY.MicroService.AuthServer.Pages; - -public class IndexModel : AbpPageModel -{ - public void OnGet() - { - } -} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Program.cs b/aspnet-core/services/LY.MicroService.AuthServer/Program.cs deleted file mode 100644 index f5e9a6635..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Program.cs +++ /dev/null @@ -1,74 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using System; -using System.IO; -using System.Threading.Tasks; -using Volo.Abp.IO; -using Volo.Abp.Modularity.PlugIns; - -namespace LY.MicroService.AuthServer; - -public class Program -{ - public async static Task Main(string[] args) - { - try - { - Console.Title = "AuthServer"; - Log.Information("Starting AuthServer."); - - var builder = WebApplication.CreateBuilder(args); - builder.Host.AddAppSettingsSecretsJson() - .UseAutofac() - .ConfigureAppConfiguration((context, config) => - { - if (context.Configuration.GetValue("AgileConfig:IsEnabled", false)) - { - config.AddAgileConfig(new AgileConfig.Client.ConfigClient(context.Configuration)); - } - }) - .UseSerilog((context, provider, config) => - { - config.ReadFrom.Configuration(context.Configuration); - }); - await builder.AddApplicationAsync(options => - { - AuthServerModule.ApplicationName = Environment.GetEnvironmentVariable("APPLICATION_NAME") - ?? AuthServerModule.ApplicationName; - options.ApplicationName = AuthServerModule.ApplicationName; - // 从环境变量取用户机密配置, 适用于容器测试 - options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID"); - // 如果容器没有指定用户机密, 从项目读取 - options.Configuration.UserSecretsAssembly = typeof(AuthServerModule).Assembly; - // 搜索 Modules 目录下所有文件作为插件 - // 取消显示引用所有其他项目的模块,改为通过插件的形式引用 - var pluginFolder = Path.Combine( - Directory.GetCurrentDirectory(), "Modules"); - DirectoryHelper.CreateIfNotExists(pluginFolder); - options.PlugInSources.AddFolder( - pluginFolder, - SearchOption.AllDirectories); - }); - var app = builder.Build(); - await app.InitializeApplicationAsync(); - await app.RunAsync(); - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Host terminated unexpectedly!"); - Console.WriteLine("Host terminated unexpectedly!"); - Console.WriteLine(ex.ToString()); - return 1; - } - finally - { - Log.CloseAndFlush(); - } - } -} - diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json b/aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json deleted file mode 100644 index be15db1ca..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Properties/launchSettings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "profiles": { - "LY.MicroService.AuthServer": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:44385;https://localhost:44386" - } - } -} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs b/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs deleted file mode 100644 index 0581a07c3..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingOptions.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace LY.MicroService.AuthServer.Ui.Branding; - -public class AccountBrandingOptions -{ - public string AppName { get; set; } - - public string LogoUrl { get; set; } - - public string LogoReverseUrl { get; set; } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs b/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs deleted file mode 100644 index 72c889639..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/Ui/Branding/AccountBrandingProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.Options; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Ui.Branding; - -namespace LY.MicroService.AuthServer.Ui.Branding; - -[Dependency(ReplaceServices = true)] -[ExposeServices(typeof(IBrandingProvider), typeof(AccountBrandingProvider))] -public class AccountBrandingProvider : IBrandingProvider, ITransientDependency -{ - private readonly AccountBrandingOptions _options; - - public AccountBrandingProvider(IOptions options) - { - _options = options.Value; - } - - public string AppName => _options.AppName ?? "MyApplication"; - - public string LogoUrl => _options.LogoUrl; - - public string LogoReverseUrl => _options.LogoReverseUrl; -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json deleted file mode 100644 index dda64ee4b..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.Development.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "AgileConfig": { - "IsEnabled": false, - "env": "DEV", - "appId": "LINGYUN.Abp.AuthServer", - "secret": "1q2w3E*", - "nodes": "http://localhost:15000", - "name": "AuthServer", - "tag": "AuthServer", - "configCacheEncrypt": true - }, - "App": { - "CorsOrigins": [ - "http://localhost:5666", - "http://localhost:30000", - "http://localhost:30010", - "http://localhost:30015", - "http://localhost:30020", - "http://localhost:30025", - "http://localhost:30030", - "http://localhost:30040", - "http://localhost:30045", - "http://localhost:30050", - "http://localhost:30060" - ], - "Urls": { - "Applications": { - "MVC": { - "RootUrl": "http://localhost:44385/", - "Urls": { - "Abp.Account.EmailConfirm": "Account/EmailConfirm", - "Abp.Account.EmailVerifyLogin": "Account/VerifyCode" - } - }, - "STS": { - "RootUrl": "http://localhost:44385/" - }, - "VueVbenAdmin": { - "RootUrl": "http://localhost:5666/", - "Urls": { - "Abp.Account.EmailConfirm": "account/email-confirm", - "Abp.Account.EmailVerifyLogin": "account/verify-code" - } - } - } - } - }, - "Auditing": { - "AllEntitiesSelector": true - }, - "DistributedCache": { - "HideErrors": true, - "KeyPrefix": "LINGYUN.Abp.Application", - "GlobalCacheEntryOptions": { - "SlidingExpiration": "30:00:00", - "AbsoluteExpirationRelativeToNow": "60:00:00" - } - }, - "ConnectionStrings": { - "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "CAP": { - "EventBus": { - "DefaultGroupName": "AuthServer", - "Version": "v1", - "FailedRetryInterval": 300, - "FailedRetryCount": 10, - "CollectorCleaningInterval": 3600000 - }, - "MySql": { - "TableNamePrefix": "auth", - "ConnectionString": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None" - }, - "RabbitMQ": { - "HostName": "localhost", - "Port": 5672, - "UserName": "admin", - "Password": "123456", - "ExchangeName": "LINGYUN.Abp.Application", - "VirtualHost": "/" - } - }, - "DistributedLock": { - "IsEnabled": true, - "Redis": { - "Configuration": "localhost,defaultDatabase=13" - } - }, - "Redis": { - "Configuration": "localhost,defaultDatabase=10", - "InstanceName": "LINGYUN.Abp.Application" - }, - "RemoteServices": { - "Default": { - "BaseUrl": "http://localhost:30000", - "UseCurrentAccessToken": true - }, - "BlobManagement": { - "BaseUrl": "http://localhost:30025", - "UseCurrentAccessToken": true - }, - "Platform": { - "BaseUrl": "http://localhost:30025", - "UseCurrentAccessToken": true - } - }, - "AuthServer": { - "Authority": "http://localhost:44385/", - "Audience": "auth-server", - "ValidAudiences": [ "lingyun-abp-application" ], - "MapInboundClaims": false, - "RequireHttpsMetadata": false - }, - "OpenIddict": { - "Applications": { - "VueAdmin": { - "ClientId": "vue-admin-client", - "ClientSecret": "1q2w3e*", - "RootUrl": "http://localhost:5666/" - }, - "InternalService": { - "ClientId": "InternalServiceClient", - "ClientSecret": "1q2w3e*" - }, - "VueOAuthClient": { - "ClientId": "vue-oauth-client", - "RootUrls": [ - "http://localhost:5666", - "http://localhost:30010", - "http://localhost:30015", - "http://localhost:30020", - "http://localhost:30025", - "http://localhost:30030", - "http://localhost:30040", - "http://localhost:30045", - "http://localhost:30050", - "http://localhost:30060" - ] - } - } - }, - "Identity": { - "Password": { - "RequiredLength": 6, - "RequiredUniqueChars": 0, - "RequireNonAlphanumeric": false, - "RequireLowercase": false, - "RequireUppercase": false, - "RequireDigit": false - }, - "Lockout": { - "AllowedForNewUsers": false, - "LockoutDuration": 5, - "MaxFailedAccessAttempts": 5 - }, - "SignIn": { - "RequireConfirmedEmail": false, - "RequireConfirmedPhoneNumber": false - } - }, - "AuditLogging": { - "Elasticsearch": { - "IndexPrefix": "abp.dev.auditing" - } - }, - "Elasticsearch": { - "NodeUris": "http://localhost:9200" - }, - "Serilog": { - "MinimumLevel": { - "Default": "Warning", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Warning" - } - }, - "WriteTo": [ - { - "Name": "Async", - "Args": { - "configure": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "Elasticsearch", - "Args": { - "nodeUris": "http://localhost:9200", - "indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}", - "autoRegisterTemplate": true, - "autoRegisterTemplateVersion": "ESv7" - } - } - ] - } - } - ] - } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json b/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json deleted file mode 100644 index a8b5a668e..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/appsettings.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "App": { - "Branding": { - "AppName": "Auth Server" - }, - "SslFile": "openiddict.pfx", - "SslPassword": "e1c48393-0c43-11f0-9582-4aecacda42db" - }, - "Clock": { - "Kind": "Local" - }, - "Forwarded": { - "ForwardedHeaders": "XForwardedFor,XForwardedProto" - }, - "StringEncryption": { - "DefaultPassPhrase": "s46c5q55nxpeS8Ra", - "InitVectorBytes": "s83ng0abvd02js84", - "DefaultSalt": "sf&5)s3#" - }, - "Json": { - "InputDateTimeFormats": [ - "yyyy-MM-dd HH:mm:ss", - "yyyy-MM-ddTHH:mm:ss" - ] - }, - "SkyWalking": { - "Enable": false - }, - "Serilog": { - "MinimumLevel": { - "Default": "Information", - "Override": { - "System": "Warning", - "Microsoft": "Warning", - "DotNetCore": "Information" - } - }, - "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], - "WriteTo": [ - { - "Name": "Async", - "Args": { - "configure": [ - { - "Name": "Console", - "Args": { - "restrictedToMinimumLevel": "Debug", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Debug-.log", - "restrictedToMinimumLevel": "Debug", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Info-.log", - "restrictedToMinimumLevel": "Information", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Warn-.log", - "restrictedToMinimumLevel": "Warning", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Error-.log", - "restrictedToMinimumLevel": "Error", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - }, - { - "Name": "File", - "Args": { - "path": "Logs/Fatal-.log", - "restrictedToMinimumLevel": "Fatal", - "rollingInterval": "Day", - "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}" - } - } - ] - } - } - ] - } -} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/package.json b/aspnet-core/services/LY.MicroService.AuthServer/package.json deleted file mode 100644 index 20ae622f7..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": "10.6.0", - "name": "my-app-authserver", - "private": true, - "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "5.6.0", - "@abp/qrcode": "10.6.0" - } -} \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css deleted file mode 100644 index ee3c5080a..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.css +++ /dev/null @@ -1,56 +0,0 @@ -@keyframes spin { - 0% { - transform: translateZ(0) rotate(0deg); - } - - 100% { - transform: translateZ(0) rotate(360deg); - } -} - -.abp-block-area { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 102; - background-color: #fff; - opacity: .8; - transition: opacity .25s; -} - - .abp-block-area.abp-block-area-disappearing { - opacity: 0; - } - - .abp-block-area.abp-block-area-busy:after { - content: attr(data-text); - display: block; - max-width: 125px; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 20px; - font-family: sans-serif; - color: #343a40; - text-align: center; - text-transform: uppercase; - } - - .abp-block-area.abp-block-area-busy:before { - content: ""; - display: block; - width: 150px; - height: 150px; - border-radius: 50%; - border-width: 2px; - border-style: solid; - border-color: transparent #228ae6 #228ae6 #228ae6; - position: absolute; - top: calc(50% - 75px); - left: calc(50% - 75px); - will-change: transform; - animation: spin .75s infinite ease-in-out; - } diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js deleted file mode 100644 index 9da162762..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/core/abp.js +++ /dev/null @@ -1,882 +0,0 @@ -var abp = abp || {}; -(function () { - - /* Application paths *****************************************/ - - //Current application root path (including virtual directory if exists). - var baseElement = document.querySelector('base'); - var baseHref = baseElement ? baseElement.getAttribute('href') : null; - abp.appPath = baseHref || abp.appPath || '/'; - - abp.pageLoadTime = new Date(); - - //Converts given path to absolute path using abp.appPath variable. - abp.toAbsAppPath = function (path) { - if (path.indexOf('/') == 0) { - path = path.substring(1); - } - - return abp.appPath + path; - }; - - /* LOGGING ***************************************************/ - //Implements Logging API that provides secure & controlled usage of console.log - - abp.log = abp.log || {}; - - abp.log.levels = { - DEBUG: 1, - INFO: 2, - WARN: 3, - ERROR: 4, - FATAL: 5 - }; - - abp.log.level = abp.log.levels.DEBUG; - - abp.log.log = function (logObject, logLevel) { - if (!window.console || !window.console.log) { - return; - } - - if (logLevel != undefined && logLevel < abp.log.level) { - return; - } - - console.log(logObject); - }; - - abp.log.debug = function (logObject) { - abp.log.log("DEBUG: ", abp.log.levels.DEBUG); - abp.log.log(logObject, abp.log.levels.DEBUG); - }; - - abp.log.info = function (logObject) { - abp.log.log("INFO: ", abp.log.levels.INFO); - abp.log.log(logObject, abp.log.levels.INFO); - }; - - abp.log.warn = function (logObject) { - abp.log.log("WARN: ", abp.log.levels.WARN); - abp.log.log(logObject, abp.log.levels.WARN); - }; - - abp.log.error = function (logObject) { - abp.log.log("ERROR: ", abp.log.levels.ERROR); - abp.log.log(logObject, abp.log.levels.ERROR); - }; - - abp.log.fatal = function (logObject) { - abp.log.log("FATAL: ", abp.log.levels.FATAL); - abp.log.log(logObject, abp.log.levels.FATAL); - }; - - /* LOCALIZATION ***********************************************/ - - abp.localization = abp.localization || {}; - abp.localization.internal = abp.localization.internal || {}; - abp.localization.values = abp.localization.values || {}; - abp.localization.resources = abp.localization.resources || {}; - - abp.localization.internal.getResource = function (resourceName) { - var resource = abp.localization.resources[resourceName]; - if (resource) { - return resource; - } - - var legacySource = abp.localization.values[resourceName]; - if (legacySource) { - return { - texts: abp.localization.values[resourceName], - baseResources: [] - }; - } - - abp.log.warn('Could not find localization source: ' + resourceName); - return null; - }; - - abp.localization.internal.localize = function (key, sourceName) { - var resource = abp.localization.internal.getResource(sourceName); - if (!resource){ - return { - value: key, - found: false - }; - } - - var value = resource.texts[key]; - if (value === undefined) { - for (var i = 0; i < resource.baseResources.length; i++){ - var basedArguments = Array.prototype.slice.call(arguments, 0); - basedArguments[1] = resource.baseResources[i]; - - var result = abp.localization.internal.localize.apply(this, basedArguments); - if (result.found){ - return result; - } - } - - return { - value: key, - found: false - }; - } - - var copiedArguments = Array.prototype.slice.call(arguments, 0); - copiedArguments.splice(1, 1); - copiedArguments[0] = value; - - return { - value: abp.utils.formatString.apply(this, copiedArguments), - found: true - }; - }; - - abp.localization.localize = function (key, sourceName) { - if (sourceName === '_') { //A convention to suppress the localization - return key; - } - - if (sourceName) { - return abp.localization.internal.localize.apply(this, arguments).value; - } - - if (!abp.localization.defaultResourceName) { - abp.log.warn('Localization source name is not specified and the defaultResourceName was not defined!'); - return key; - } - - var copiedArguments = Array.prototype.slice.call(arguments, 0); - copiedArguments.splice(1, 1, abp.localization.defaultResourceName); - - return abp.localization.internal.localize.apply(this, copiedArguments).value; - }; - - abp.localization.isLocalized = function (key, sourceName) { - if (sourceName === '_') { //A convention to suppress the localization - return true; - } - - sourceName = sourceName || abp.localization.defaultResourceName; - if (!sourceName) { - return false; - } - - return abp.localization.internal.localize(key, sourceName).found; - }; - - abp.localization.getResource = function (name) { - return function () { - var copiedArguments = Array.prototype.slice.call(arguments, 0); - copiedArguments.splice(1, 0, name); - return abp.localization.localize.apply(this, copiedArguments); - }; - }; - - abp.localization.defaultResourceName = undefined; - abp.localization.currentCulture = { - cultureName: undefined - }; - - var getMapValue = function (packageMaps, packageName, language) { - language = language || abp.localization.currentCulture.name; - if (!packageMaps || !packageName || !language) { - return language; - } - - var packageMap = packageMaps[packageName]; - if (!packageMap) { - return language; - } - - for (var i = 0; i < packageMap.length; i++) { - var map = packageMap[i]; - if (map.name === language){ - return map.value; - } - } - - return language; - }; - - abp.localization.getLanguagesMap = function (packageName, language) { - return getMapValue(abp.localization.languagesMap, packageName, language); - }; - - abp.localization.getLanguageFilesMap = function (packageName, language) { - return getMapValue(abp.localization.languageFilesMap, packageName, language); - }; - - /* AUTHORIZATION **********************************************/ - - abp.auth = abp.auth || {}; - - abp.auth.grantedPolicies = abp.auth.grantedPolicies || {}; - - abp.auth.isGranted = function (policyName) { - return abp.auth.grantedPolicies[policyName] != undefined; - }; - - abp.auth.isAnyGranted = function () { - if (!arguments || arguments.length <= 0) { - return true; - } - - for (var i = 0; i < arguments.length; i++) { - if (abp.auth.isGranted(arguments[i])) { - return true; - } - } - - return false; - }; - - abp.auth.areAllGranted = function () { - if (!arguments || arguments.length <= 0) { - return true; - } - - for (var i = 0; i < arguments.length; i++) { - if (!abp.auth.isGranted(arguments[i])) { - return false; - } - } - - return true; - }; - - abp.auth.tokenCookieName = 'Abp.AuthToken'; - - abp.auth.setToken = function (authToken, expireDate) { - abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain); - }; - - abp.auth.getToken = function () { - return abp.utils.getCookieValue(abp.auth.tokenCookieName); - } - - abp.auth.clearToken = function () { - abp.auth.setToken(); - } - - /* SETTINGS *************************************************/ - - abp.setting = abp.setting || {}; - - abp.setting.values = abp.setting.values || {}; - - abp.setting.get = function (name) { - return abp.setting.values[name]; - }; - - abp.setting.getBoolean = function (name) { - var value = abp.setting.get(name); - return value == 'true' || value == 'True'; - }; - - abp.setting.getInt = function (name) { - return parseInt(abp.setting.values[name]); - }; - - /* NOTIFICATION *********************************************/ - //Defines Notification API, not implements it - - abp.notify = abp.notify || {}; - - abp.notify.success = function (message, title, options) { - abp.log.warn('abp.notify.success is not implemented!'); - }; - - abp.notify.info = function (message, title, options) { - abp.log.warn('abp.notify.info is not implemented!'); - }; - - abp.notify.warn = function (message, title, options) { - abp.log.warn('abp.notify.warn is not implemented!'); - }; - - abp.notify.error = function (message, title, options) { - abp.log.warn('abp.notify.error is not implemented!'); - }; - - /* MESSAGE **************************************************/ - //Defines Message API, not implements it - - abp.message = abp.message || {}; - - abp.message._showMessage = function (message, title) { - alert((title || '') + ' ' + message); - }; - - abp.message.info = function (message, title) { - abp.log.warn('abp.message.info is not implemented!'); - return abp.message._showMessage(message, title); - }; - - abp.message.success = function (message, title) { - abp.log.warn('abp.message.success is not implemented!'); - return abp.message._showMessage(message, title); - }; - - abp.message.warn = function (message, title) { - abp.log.warn('abp.message.warn is not implemented!'); - return abp.message._showMessage(message, title); - }; - - abp.message.error = function (message, title) { - abp.log.warn('abp.message.error is not implemented!'); - return abp.message._showMessage(message, title); - }; - - abp.message.confirm = function (message, titleOrCallback, callback) { - abp.log.warn('abp.message.confirm is not properly implemented!'); - - if (titleOrCallback && !(typeof titleOrCallback == 'string')) { - callback = titleOrCallback; - } - - var result = confirm(message); - callback && callback(result); - }; - - abp.message.prompt = function (message, titleOrOptionsOrCallback, callback) { - abp.log.warn('abp.message.prompt is not properly implemented!'); - - if (titleOrOptionsOrCallback && !(typeof titleOrOptionsOrCallback == 'string')) { - callback = titleOrOptionsOrCallback; - } - - var result = prompt(message); - callback && callback(result); - }; - - /* UI *******************************************************/ - - abp.ui = abp.ui || {}; - - /* UI BLOCK */ - //Defines UI Block API and implements basically - - var $abpBlockArea = document.createElement('div'); - $abpBlockArea.classList.add('abp-block-area'); - - /* opts: { //Can be an object with options or a string for query a selector - * elm: a query selector (optional - default: document.body) - * busy: boolean (optional - default: false) - * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided) - * } - */ - abp.ui.block = function (opts) { - if (!opts) { - opts = {}; - } else if (typeof opts == 'string') { - opts = { - elm: opts - }; - } - - var $elm = document.querySelector(opts.elm) || document.body; - - if (opts.busy) { - $abpBlockArea.classList.add('abp-block-area-busy'); - } else { - $abpBlockArea.classList.remove('abp-block-area-busy'); - } - - if (document.querySelector(opts.elm)) { - $abpBlockArea.style.position = 'absolute'; - } else { - $abpBlockArea.style.position = 'fixed'; - } - - $elm.appendChild($abpBlockArea); - - if (opts.promise) { - if (opts.promise.always) { //jQuery.Deferred style - opts.promise.always(function () { - abp.ui.unblock({ - $elm: opts.elm - }); - }); - } else if (opts.promise['finally']) { //Q style - opts.promise['finally'](function () { - abp.ui.unblock({ - $elm: opts.elm - }); - }); - } - } - }; - - /* opts: { - * - * } - */ - abp.ui.unblock = function (opts) { - var element = document.querySelector('.abp-block-area'); - if (element) { - element.classList.add('abp-block-area-disappearing'); - setTimeout(function () { - if (element) { - element.classList.remove('abp-block-area-disappearing'); - if (element.parentElement) { - element.parentElement.removeChild(element); - } - } - }, 250); - } - }; - - /* UI BUSY */ - //Defines UI Busy API, not implements it - - abp.ui.setBusy = function (opts) { - if (!opts) { - opts = { - busy: true - }; - } else if (typeof opts == 'string') { - opts = { - elm: opts, - busy: true - }; - } - - abp.ui.block(opts); - }; - - abp.ui.clearBusy = function (opts) { - abp.ui.unblock(opts); - }; - - /* SIMPLE EVENT BUS *****************************************/ - - abp.event = (function () { - - var _callbacks = {}; - - var on = function (eventName, callback) { - if (!_callbacks[eventName]) { - _callbacks[eventName] = []; - } - - _callbacks[eventName].push(callback); - }; - - var off = function (eventName, callback) { - var callbacks = _callbacks[eventName]; - if (!callbacks) { - return; - } - - var index = -1; - for (var i = 0; i < callbacks.length; i++) { - if (callbacks[i] === callback) { - index = i; - break; - } - } - - if (index < 0) { - return; - } - - _callbacks[eventName].splice(index, 1); - }; - - var trigger = function (eventName) { - var callbacks = _callbacks[eventName]; - if (!callbacks || !callbacks.length) { - return; - } - - var args = Array.prototype.slice.call(arguments, 1); - for (var i = 0; i < callbacks.length; i++) { - try { - callbacks[i].apply(this, args); - } catch(e) { - console.error(e); - } - } - }; - - // Public interface /////////////////////////////////////////////////// - - return { - on: on, - off: off, - trigger: trigger - }; - })(); - - - /* UTILS ***************************************************/ - - abp.utils = abp.utils || {}; - - /* Creates a name namespace. - * Example: - * var taskService = abp.utils.createNamespace(abp, 'services.task'); - * taskService will be equal to abp.services.task - * first argument (root) must be defined first - ************************************************************/ - abp.utils.createNamespace = function (root, ns) { - var parts = ns.split('.'); - for (var i = 0; i < parts.length; i++) { - if (typeof root[parts[i]] == 'undefined') { - root[parts[i]] = {}; - } - - root = root[parts[i]]; - } - - return root; - }; - - /* Find and replaces a string (search) to another string (replacement) in - * given string (str). - * Example: - * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string' - ************************************************************/ - abp.utils.replaceAll = function (str, search, replacement) { - var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - return str.replace(new RegExp(fix, 'g'), replacement); - }; - - /* Formats a string just like string.format in C#. - * Example: - * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana' - ************************************************************/ - abp.utils.formatString = function () { - if (arguments.length < 1) { - return null; - } - - var str = arguments[0]; - - for (var i = 1; i < arguments.length; i++) { - var placeHolder = '{' + (i - 1) + '}'; - str = abp.utils.replaceAll(str, placeHolder, arguments[i]); - } - - return str; - }; - - abp.utils.toPascalCase = function (str) { - if (!str || !str.length) { - return str; - } - - if (str.length === 1) { - return str.charAt(0).toUpperCase(); - } - - return str.charAt(0).toUpperCase() + str.substr(1); - } - - abp.utils.toCamelCase = function (str) { - if (!str || !str.length) { - return str; - } - - if (str.length === 1) { - return str.charAt(0).toLowerCase(); - } - - return str.charAt(0).toLowerCase() + str.substr(1); - } - - abp.utils.truncateString = function (str, maxLength) { - if (!str || !str.length || str.length <= maxLength) { - return str; - } - - return str.substr(0, maxLength); - }; - - abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) { - postfix = postfix || '...'; - - if (!str || !str.length || str.length <= maxLength) { - return str; - } - - if (maxLength <= postfix.length) { - return postfix.substr(0, maxLength); - } - - return str.substr(0, maxLength - postfix.length) + postfix; - }; - - abp.utils.isFunction = function (obj) { - return !!(obj && obj.constructor && obj.call && obj.apply); - }; - - /** - * parameterInfos should be an array of { name, value } objects - * where name is query string parameter name and value is it's value. - * includeQuestionMark is true by default. - */ - abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) { - if (includeQuestionMark === undefined) { - includeQuestionMark = true; - } - - var qs = ''; - - function addSeperator() { - if (!qs.length) { - if (includeQuestionMark) { - qs = qs + '?'; - } - } else { - qs = qs + '&'; - } - } - - for (var i = 0; i < parameterInfos.length; ++i) { - var parameterInfo = parameterInfos[i]; - if (parameterInfo.value === undefined) { - continue; - } - - if (parameterInfo.value === null) { - parameterInfo.value = ''; - } - - addSeperator(); - - if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") { - qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON()); - } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) { - for (var j = 0; j < parameterInfo.value.length; j++) { - if (j > 0) { - addSeperator(); - } - - qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]); - } - } else { - qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value); - } - } - - return qs; - } - - /** - * Sets a cookie value for given key. - * This is a simple implementation created to be used by ABP. - * Please use a complete cookie library if you need. - * @param {string} key - * @param {string} value - * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session. - * @param {string} path (optional) - */ - abp.utils.setCookieValue = function (key, value, expireDate, path) { - var cookieValue = encodeURIComponent(key) + '='; - - if (value) { - cookieValue = cookieValue + encodeURIComponent(value); - } - - if (expireDate) { - cookieValue = cookieValue + "; expires=" + expireDate.toUTCString(); - } - - if (path) { - cookieValue = cookieValue + "; path=" + path; - } - - document.cookie = cookieValue; - }; - - /** - * Gets a cookie with given key. - * This is a simple implementation created to be used by ABP. - * Please use a complete cookie library if you need. - * @param {string} key - * @returns {string} Cookie value or null - */ - abp.utils.getCookieValue = function (key) { - var equalities = document.cookie.split('; '); - for (var i = 0; i < equalities.length; i++) { - if (!equalities[i]) { - continue; - } - - var splitted = equalities[i].split('='); - if (splitted.length != 2) { - continue; - } - - if (decodeURIComponent(splitted[0]) === key) { - return decodeURIComponent(splitted[1] || ''); - } - } - - return null; - }; - - /** - * Deletes cookie for given key. - * This is a simple implementation created to be used by ABP. - * Please use a complete cookie library if you need. - * @param {string} key - * @param {string} path (optional) - */ - abp.utils.deleteCookie = function (key, path) { - var cookieValue = encodeURIComponent(key) + '='; - - cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString(); - - if (path) { - cookieValue = cookieValue + "; path=" + path; - } - - document.cookie = cookieValue; - } - - /** - * Escape HTML to help prevent XSS attacks. - */ - abp.utils.htmlEscape = function (html) { - return typeof html === 'string' ? html.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"') : html; - } - - /* SECURITY ***************************************/ - abp.security = abp.security || {}; - abp.security.antiForgery = abp.security.antiForgery || {}; - - abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; - - abp.security.antiForgery.getToken = function () { - return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); - }; - - /* CLOCK *****************************************/ - abp.clock = abp.clock || {}; - - abp.clock.kind = 'Unspecified'; - - abp.clock.supportsMultipleTimezone = function () { - return abp.clock.kind === 'Utc'; - } - - abp.clock.timeZone = function () { - return abp.setting.get('Abp.Timing.TimeZone') || abp.clock.browserTimeZone(); - } - - // Normalize Date object or date string to standard string format that will be sent to server - abp.clock.normalizeToString = function (date) { - if (!date) { - return date; - } - - var dateObj = date instanceof Date ? date : new Date(date); - if (isNaN(dateObj)) { - return date; - } - - function padZero(num) { - return num < 10 ? '0' + num : num; - } - - var addZulu = false; - if (abp.clock.supportsMultipleTimezone()) { - var timeZone = abp.clock.timeZone(); - var now = new Date(); - var formattedDate = now.toLocaleString('en-US', { timeZone: timeZone, timeZoneName: 'longOffset' }); - var match = formattedDate.match(/GMT([+-]\d+)/); - var targetOffsetHours = match ? parseInt(match[1], 10) : 0; - dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000)); - addZulu = true; - } - - // yyyy-MM-DDTHH:mm:ss - return dateObj.getFullYear() + '-' + - padZero(dateObj.getMonth() + 1) + '-' + - padZero(dateObj.getDate()) + 'T' + - padZero(dateObj.getHours()) + ':' + - padZero(dateObj.getMinutes()) + ':' + - padZero(dateObj.getSeconds()) + (addZulu ? 'Z' : ''); - }; - - // Default options for toLocaleString - abp.clock.toLocaleStringOptions = abp.clock.toLocaleStringOptions || { - "year": "numeric", - "month": "long", - "day": "numeric", - "hour": "numeric", - "minute": "numeric", - "second": "numeric" - }; - - // Normalize date string to locale date string that will be displayed to user - abp.clock.normalizeToLocaleString = function (dateString, options) { - if (!dateString) { - return dateString; - } - - var date = new Date(dateString); - if (isNaN(date)) { - return dateString; - } - - var culture = abp.localization.currentCulture.cultureName; - options = options || abp.clock.toLocaleStringOptions; - if (abp.clock.supportsMultipleTimezone()) { - var timezone = abp.clock.timeZone(); - if (timezone) { - return date.toLocaleString(culture, Object.assign({}, options, { timeZone: timezone })); - } - } - return date.toLocaleString(culture, options); - } - - abp.clock.browserTimeZone = function () { - return Intl.DateTimeFormat().resolvedOptions().timeZone; - } - - abp.clock.trySetBrowserTimeZoneToCookie = true; - - abp.clock.setBrowserTimeZoneToCookie = function () { - if (!abp.clock.trySetBrowserTimeZoneToCookie || !abp.clock.supportsMultipleTimezone()) { - return; - } - - abp.utils.setCookieValue('__timezone', abp.clock.browserTimeZone(), new Date(new Date().setFullYear(new Date().getFullYear() + 1)), '/'); - } - - abp.event.on('abp.configurationInitialized', function () { - abp.clock.setBrowserTimeZoneToCookie(); - }); - - /* FEATURES *************************************************/ - - abp.features = abp.features || {}; - - abp.features.values = abp.features.values || {}; - - abp.features.isEnabled = function(name){ - var value = abp.features.get(name); - return value == 'true' || value == 'True'; - } - - abp.features.get = function (name) { - return abp.features.values[name]; - }; - - /* GLOBAL FEATURES *************************************************/ - - abp.globalFeatures = abp.globalFeatures || {}; - - abp.globalFeatures.enabledFeatures = abp.globalFeatures.enabledFeatures || []; - - abp.globalFeatures.isEnabled = function(name){ - return abp.globalFeatures.enabledFeatures.indexOf(name) != -1; - } - -})(); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js deleted file mode 100644 index 2dcbd2224..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/luxon/abp.luxon.js +++ /dev/null @@ -1,102 +0,0 @@ -var abp = abp || {}; -(function () { - - if (!luxon) { - throw "abp/luxon library requires the luxon library included to the page!"; - } - - /* TIMING *************************************************/ - - abp.timing = abp.timing || {}; - - var setObjectValue = function (obj, property, value) { - if (typeof property === "string") { - property = property.split('.'); - } - - if (property.length > 1) { - var p = property.shift(); - setObjectValue(obj[p], property, value); - } else { - obj[property[0]] = value; - } - } - - var getObjectValue = function (obj, property) { - return property.split('.').reduce((a, v) => a[v], obj) - } - - abp.timing.convertFieldsToIsoDate = function (form, fields) { - for (var field of fields) { - var dateTime = luxon.DateTime - .fromFormat( - getObjectValue(form, field), - abp.localization.currentCulture.dateTimeFormat.shortDatePattern, - { locale: abp.localization.currentCulture.cultureName } - ); - - if (!dateTime.invalid) { - setObjectValue(form, field, dateTime.toFormat("yyyy-MM-dd HH:mm:ss")) - } - } - - return form; - } - - // Normalize Date object or date string to standard string format that will be sent to server - abp.clock.normalizeToString = function (date) { - if (!date) { - return date; - } - - var dateObj = date instanceof Date ? date : new Date(date); - if (isNaN(dateObj)) { - return date; - } - - var timeZone = abp.clock.timeZone(); - if (abp.clock.supportsMultipleTimezone() && timeZone) { - return luxon.DateTime.fromObject({ - year: dateObj.getFullYear(), - month: dateObj.getMonth() + 1, - day: dateObj.getDate(), - hour: dateObj.getHours(), - minute: dateObj.getMinutes(), - second: dateObj.getSeconds() - }, { zone: timeZone }).setZone("utc").toISO(); - } else { - return luxon.DateTime.fromJSDate(dateObj).toFormat("yyyy-MM-dd'T'HH:mm:ss"); - } - }; - - // Normalize date string to locale date string that will be displayed to user - abp.clock.normalizeToLocaleString = function (dateString, options) { - if (!dateString) { - return dateString; - } - - var date = new Date(dateString); - if (isNaN(date)) { - return dateString; - } - - options = options || abp.clock.toLocaleStringOptions; - if (abp.clock.supportsMultipleTimezone()) { - var timezone = abp.clock.timeZone(); - if (timezone) { - return luxon.DateTime.fromJSDate(date) - .setZone(timezone) - .setLocale(abp.localization.currentCulture.cultureName) - .toLocaleString(options); - } - } - - return luxon.DateTime.fromJSDate(date) - .setLocale(abp.localization.currentCulture.cultureName) - .toLocaleString(options); - } - - abp.clock.browserTimeZone = function () { - return luxon.DateTime.local().zoneName; - } -})(jQuery); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js deleted file mode 100644 index 359d2f724..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/abp/utils/abp-utils.umd.js +++ /dev/null @@ -1,694 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('just-compare')) : - typeof define === 'function' && define.amd ? define('@abp/utils', ['exports', 'just-compare'], factory) : - (global = global || self, factory((global.abp = global.abp || {}, global.abp.utils = global.abp.utils || {}, global.abp.utils.common = {}), global.compare)); -}(this, (function (exports, compare) { 'use strict'; - - compare = compare && Object.prototype.hasOwnProperty.call(compare, 'default') ? compare['default'] : compare; - - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) - if (b.hasOwnProperty(p)) - d[p] = b[p]; }; - return extendStatics(d, b); - }; - function __extends(d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - function __rest(s, e) { - var t = {}; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - } - function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") - r = Reflect.decorate(decorators, target, key, desc); - else - for (var i = decorators.length - 1; i >= 0; i--) - if (d = decorators[i]) - r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - } - function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); }; - } - function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") - return Reflect.metadata(metadataKey, metadataValue); - } - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { - step(generator.next(value)); - } - catch (e) { - reject(e); - } } - function rejected(value) { try { - step(generator["throw"](value)); - } - catch (e) { - reject(e); - } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - function __generator(thisArg, body) { - var _ = { label: 0, sent: function () { if (t[0] & 1) - throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_) - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) - return t; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } - catch (e) { - op = [6, e]; - y = 0; - } - finally { - f = t = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - } - var __createBinding = Object.create ? (function (o, m, k, k2) { - if (k2 === undefined) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } }); - }) : (function (o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - function __exportStar(m, exports) { - for (var p in m) - if (p !== "default" && !exports.hasOwnProperty(p)) - __createBinding(exports, m, p); - } - function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) - return m.call(o); - if (o && typeof o.length === "number") - return { - next: function () { - if (o && i >= o.length) - o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) - return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) - ar.push(r.value); - } - catch (error) { - e = { error: error }; - } - finally { - try { - if (r && !r.done && (m = i["return"])) - m.call(i); - } - finally { - if (e) - throw e.error; - } - } - return ar; - } - function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - } - function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) - s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - } - ; - function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - } - function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) - throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) - i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { - step(g[n](v)); - } - catch (e) { - settle(q[0][3], e); - } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) - resume(q[0][0], q[0][1]); } - } - function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - } - function __asyncValues(o) { - if (!Symbol.asyncIterator) - throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); } - } - function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } - else { - cooked.raw = raw; - } - return cooked; - } - ; - var __setModuleDefault = Object.create ? (function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function (o, v) { - o["default"] = v; - }; - function __importStar(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - } - function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; - } - function __classPrivateFieldGet(receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); - } - function __classPrivateFieldSet(receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; - } - - var ListNode = /** @class */ (function () { - function ListNode(value) { - this.value = value; - } - return ListNode; - }()); - var LinkedList = /** @class */ (function () { - function LinkedList() { - this.size = 0; - } - Object.defineProperty(LinkedList.prototype, "head", { - get: function () { - return this.first; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LinkedList.prototype, "tail", { - get: function () { - return this.last; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LinkedList.prototype, "length", { - get: function () { - return this.size; - }, - enumerable: false, - configurable: true - }); - LinkedList.prototype.attach = function (value, previousNode, nextNode) { - if (!previousNode) - return this.addHead(value); - if (!nextNode) - return this.addTail(value); - var node = new ListNode(value); - node.previous = previousNode; - previousNode.next = node; - node.next = nextNode; - nextNode.previous = node; - this.size++; - return node; - }; - LinkedList.prototype.attachMany = function (values, previousNode, nextNode) { - if (!values.length) - return []; - if (!previousNode) - return this.addManyHead(values); - if (!nextNode) - return this.addManyTail(values); - var list = new LinkedList(); - list.addManyTail(values); - list.first.previous = previousNode; - previousNode.next = list.first; - list.last.next = nextNode; - nextNode.previous = list.last; - this.size += values.length; - return list.toNodeArray(); - }; - LinkedList.prototype.detach = function (node) { - if (!node.previous) - return this.dropHead(); - if (!node.next) - return this.dropTail(); - node.previous.next = node.next; - node.next.previous = node.previous; - this.size--; - return node; - }; - LinkedList.prototype.add = function (value) { - var _this = this; - return { - after: function () { - var _a; - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return (_a = _this.addAfter).call.apply(_a, __spread([_this, value], params)); - }, - before: function () { - var _a; - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return (_a = _this.addBefore).call.apply(_a, __spread([_this, value], params)); - }, - byIndex: function (position) { return _this.addByIndex(value, position); }, - head: function () { return _this.addHead(value); }, - tail: function () { return _this.addTail(value); }, - }; - }; - LinkedList.prototype.addMany = function (values) { - var _this = this; - return { - after: function () { - var _a; - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return (_a = _this.addManyAfter).call.apply(_a, __spread([_this, values], params)); - }, - before: function () { - var _a; - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return (_a = _this.addManyBefore).call.apply(_a, __spread([_this, values], params)); - }, - byIndex: function (position) { return _this.addManyByIndex(values, position); }, - head: function () { return _this.addManyHead(values); }, - tail: function () { return _this.addManyTail(values); }, - }; - }; - LinkedList.prototype.addAfter = function (value, previousValue, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var previous = this.find(function (node) { return compareFn(node.value, previousValue); }); - return previous ? this.attach(value, previous, previous.next) : this.addTail(value); - }; - LinkedList.prototype.addBefore = function (value, nextValue, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var next = this.find(function (node) { return compareFn(node.value, nextValue); }); - return next ? this.attach(value, next.previous, next) : this.addHead(value); - }; - LinkedList.prototype.addByIndex = function (value, position) { - if (position < 0) - position += this.size; - else if (position >= this.size) - return this.addTail(value); - if (position <= 0) - return this.addHead(value); - var next = this.get(position); - return this.attach(value, next.previous, next); - }; - LinkedList.prototype.addHead = function (value) { - var node = new ListNode(value); - node.next = this.first; - if (this.first) - this.first.previous = node; - else - this.last = node; - this.first = node; - this.size++; - return node; - }; - LinkedList.prototype.addTail = function (value) { - var node = new ListNode(value); - if (this.first) { - node.previous = this.last; - this.last.next = node; - this.last = node; - } - else { - this.first = node; - this.last = node; - } - this.size++; - return node; - }; - LinkedList.prototype.addManyAfter = function (values, previousValue, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var previous = this.find(function (node) { return compareFn(node.value, previousValue); }); - return previous ? this.attachMany(values, previous, previous.next) : this.addManyTail(values); - }; - LinkedList.prototype.addManyBefore = function (values, nextValue, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var next = this.find(function (node) { return compareFn(node.value, nextValue); }); - return next ? this.attachMany(values, next.previous, next) : this.addManyHead(values); - }; - LinkedList.prototype.addManyByIndex = function (values, position) { - if (position < 0) - position += this.size; - if (position <= 0) - return this.addManyHead(values); - if (position >= this.size) - return this.addManyTail(values); - var next = this.get(position); - return this.attachMany(values, next.previous, next); - }; - LinkedList.prototype.addManyHead = function (values) { - var _this = this; - return values.reduceRight(function (nodes, value) { - nodes.unshift(_this.addHead(value)); - return nodes; - }, []); - }; - LinkedList.prototype.addManyTail = function (values) { - var _this = this; - return values.map(function (value) { return _this.addTail(value); }); - }; - LinkedList.prototype.drop = function () { - var _this = this; - return { - byIndex: function (position) { return _this.dropByIndex(position); }, - byValue: function () { - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return _this.dropByValue.apply(_this, params); - }, - byValueAll: function () { - var params = []; - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - return _this.dropByValueAll.apply(_this, params); - }, - head: function () { return _this.dropHead(); }, - tail: function () { return _this.dropTail(); }, - }; - }; - LinkedList.prototype.dropMany = function (count) { - var _this = this; - return { - byIndex: function (position) { return _this.dropManyByIndex(count, position); }, - head: function () { return _this.dropManyHead(count); }, - tail: function () { return _this.dropManyTail(count); }, - }; - }; - LinkedList.prototype.dropByIndex = function (position) { - if (position < 0) - position += this.size; - var current = this.get(position); - return current ? this.detach(current) : undefined; - }; - LinkedList.prototype.dropByValue = function (value, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var position = this.findIndex(function (node) { return compareFn(node.value, value); }); - return position < 0 ? undefined : this.dropByIndex(position); - }; - LinkedList.prototype.dropByValueAll = function (value, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - var dropped = []; - for (var current = this.first, position = 0; current; position++, current = current.next) { - if (compareFn(current.value, value)) { - dropped.push(this.dropByIndex(position - dropped.length)); - } - } - return dropped; - }; - LinkedList.prototype.dropHead = function () { - var head = this.first; - if (head) { - this.first = head.next; - if (this.first) - this.first.previous = undefined; - else - this.last = undefined; - this.size--; - return head; - } - return undefined; - }; - LinkedList.prototype.dropTail = function () { - var tail = this.last; - if (tail) { - this.last = tail.previous; - if (this.last) - this.last.next = undefined; - else - this.first = undefined; - this.size--; - return tail; - } - return undefined; - }; - LinkedList.prototype.dropManyByIndex = function (count, position) { - if (count <= 0) - return []; - if (position < 0) - position = Math.max(position + this.size, 0); - else if (position >= this.size) - return []; - count = Math.min(count, this.size - position); - var dropped = []; - while (count--) { - var current = this.get(position); - dropped.push(this.detach(current)); - } - return dropped; - }; - LinkedList.prototype.dropManyHead = function (count) { - if (count <= 0) - return []; - count = Math.min(count, this.size); - var dropped = []; - while (count--) - dropped.unshift(this.dropHead()); - return dropped; - }; - LinkedList.prototype.dropManyTail = function (count) { - if (count <= 0) - return []; - count = Math.min(count, this.size); - var dropped = []; - while (count--) - dropped.push(this.dropTail()); - return dropped; - }; - LinkedList.prototype.find = function (predicate) { - for (var current = this.first, position = 0; current; position++, current = current.next) { - if (predicate(current, position, this)) - return current; - } - return undefined; - }; - LinkedList.prototype.findIndex = function (predicate) { - for (var current = this.first, position = 0; current; position++, current = current.next) { - if (predicate(current, position, this)) - return position; - } - return -1; - }; - LinkedList.prototype.forEach = function (iteratorFn) { - for (var node = this.first, position = 0; node; position++, node = node.next) { - iteratorFn(node, position, this); - } - }; - LinkedList.prototype.get = function (position) { - return this.find(function (_, index) { return position === index; }); - }; - LinkedList.prototype.indexOf = function (value, compareFn) { - if (compareFn === void 0) { compareFn = compare; } - return this.findIndex(function (node) { return compareFn(node.value, value); }); - }; - LinkedList.prototype.toArray = function () { - var array = new Array(this.size); - this.forEach(function (node, index) { return (array[index] = node.value); }); - return array; - }; - LinkedList.prototype.toNodeArray = function () { - var array = new Array(this.size); - this.forEach(function (node, index) { return (array[index] = node); }); - return array; - }; - LinkedList.prototype.toString = function (mapperFn) { - if (mapperFn === void 0) { mapperFn = JSON.stringify; } - return this.toArray() - .map(function (value) { return mapperFn(value); }) - .join(' <-> '); - }; - // Cannot use Generator type because of ng-packagr - LinkedList.prototype[Symbol.iterator] = function () { - var node, position; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - node = this.first, position = 0; - _a.label = 1; - case 1: - if (!node) return [3 /*break*/, 4]; - return [4 /*yield*/, node.value]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - position++, node = node.next; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/]; - } - }); - }; - return LinkedList; - }()); - - /* - * Public API Surface of utils - */ - - /** - * Generated bundle index. Do not edit. - */ - - exports.LinkedList = LinkedList; - exports.ListNode = ListNode; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=abp-utils.umd.js.map diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sw.min.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sw.min.js deleted file mode 100644 index 454d3053c..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/bootstrap-datepicker/locales/bootstrap-datepicker.sw.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){a.fn.datepicker.dates.sw={days:["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],daysShort:["J2","J3","J4","J5","Alh","Ij","J1"],daysMin:["2","3","4","5","A","I","1"],months:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],monthsShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Des"],today:"Leo"}}(jQuery); \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js deleted file mode 100644 index c78e6b708..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js +++ /dev/null @@ -1,435 +0,0 @@ -/** - * @license - * Unobtrusive validation support library for jQuery and jQuery Validate - * Copyright (c) .NET Foundation. All rights reserved. - * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - * @version v4.0.0 - */ - -/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ -/*global document: false, jQuery: false */ - -(function (factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define("jquery.validate.unobtrusive", ['jquery-validation'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports - module.exports = factory(require('jquery-validation')); - } else { - // Browser global - jQuery.validator.unobtrusive = factory(jQuery); - } -}(function ($) { - var $jQval = $.validator, - adapters, - data_validation = "unobtrusiveValidation"; - - function setValidationValues(options, ruleName, value) { - options.rules[ruleName] = value; - if (options.message) { - options.messages[ruleName] = options.message; - } - } - - function splitAndTrim(value) { - return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); - } - - function escapeAttributeValue(value) { - // As mentioned on http://api.jquery.com/category/selectors/ - return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); - } - - function getModelPrefix(fieldName) { - return fieldName.substr(0, fieldName.lastIndexOf(".") + 1); - } - - function appendModelPrefix(value, prefix) { - if (value.indexOf("*.") === 0) { - value = value.replace("*.", prefix); - } - return value; - } - - function onError(error, inputElement) { // 'this' is the form element - var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), - replaceAttrValue = container.attr("data-valmsg-replace"), - replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null; - - container.removeClass("field-validation-valid").addClass("field-validation-error"); - error.data("unobtrusiveContainer", container); - - if (replace) { - container.empty(); - error.removeClass("input-validation-error").appendTo(container); - } - else { - error.hide(); - } - } - - function onErrors(event, validator) { // 'this' is the form element - var container = $(this).find("[data-valmsg-summary=true]"), - list = container.find("ul"); - - if (list && list.length && validator.errorList.length) { - list.empty(); - container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); - - $.each(validator.errorList, function () { - $("
  • ").html(this.message).appendTo(list); - }); - } - } - - function onSuccess(error) { // 'this' is the form element - var container = error.data("unobtrusiveContainer"); - - if (container) { - var replaceAttrValue = container.attr("data-valmsg-replace"), - replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; - - container.addClass("field-validation-valid").removeClass("field-validation-error"); - error.removeData("unobtrusiveContainer"); - - if (replace) { - container.empty(); - } - } - } - - function onReset(event) { // 'this' is the form element - var $form = $(this), - key = '__jquery_unobtrusive_validation_form_reset'; - if ($form.data(key)) { - return; - } - // Set a flag that indicates we're currently resetting the form. - $form.data(key, true); - try { - $form.data("validator").resetForm(); - } finally { - $form.removeData(key); - } - - $form.find(".validation-summary-errors") - .addClass("validation-summary-valid") - .removeClass("validation-summary-errors"); - $form.find(".field-validation-error") - .addClass("field-validation-valid") - .removeClass("field-validation-error") - .removeData("unobtrusiveContainer") - .find(">*") // If we were using valmsg-replace, get the underlying error - .removeData("unobtrusiveContainer"); - } - - function validationInfo(form) { - var $form = $(form), - result = $form.data(data_validation), - onResetProxy = $.proxy(onReset, form), - defaultOptions = $jQval.unobtrusive.options || {}, - execInContext = function (name, args) { - var func = defaultOptions[name]; - func && $.isFunction(func) && func.apply(form, args); - }; - - if (!result) { - result = { - options: { // options structure passed to jQuery Validate's validate() method - errorClass: defaultOptions.errorClass || "input-validation-error", - errorElement: defaultOptions.errorElement || "span", - errorPlacement: function () { - onError.apply(form, arguments); - execInContext("errorPlacement", arguments); - }, - invalidHandler: function () { - onErrors.apply(form, arguments); - execInContext("invalidHandler", arguments); - }, - messages: {}, - rules: {}, - success: function () { - onSuccess.apply(form, arguments); - execInContext("success", arguments); - } - }, - attachValidation: function () { - $form - .off("reset." + data_validation, onResetProxy) - .on("reset." + data_validation, onResetProxy) - .validate(this.options); - }, - validate: function () { // a validation function that is called by unobtrusive Ajax - $form.validate(); - return $form.valid(); - } - }; - $form.data(data_validation, result); - } - - return result; - } - - $jQval.unobtrusive = { - adapters: [], - - parseElement: function (element, skipAttach) { - /// - /// Parses a single HTML element for unobtrusive validation attributes. - /// - /// The HTML element to be parsed. - /// [Optional] true to skip attaching the - /// validation to the form. If parsing just this single element, you should specify true. - /// If parsing several elements, you should specify false, and manually attach the validation - /// to the form when you are finished. The default is false. - var $element = $(element), - form = $element.parents("form")[0], - valInfo, rules, messages; - - if (!form) { // Cannot do client-side validation without a form - return; - } - - valInfo = validationInfo(form); - valInfo.options.rules[element.name] = rules = {}; - valInfo.options.messages[element.name] = messages = {}; - - $.each(this.adapters, function () { - var prefix = "data-val-" + this.name, - message = $element.attr(prefix), - paramValues = {}; - - if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy) - prefix += "-"; - - $.each(this.params, function () { - paramValues[this] = $element.attr(prefix + this); - }); - - this.adapt({ - element: element, - form: form, - message: message, - params: paramValues, - rules: rules, - messages: messages - }); - } - }); - - $.extend(rules, { "__dummy__": true }); - - if (!skipAttach) { - valInfo.attachValidation(); - } - }, - - parse: function (selector) { - /// - /// Parses all the HTML elements in the specified selector. It looks for input elements decorated - /// with the [data-val=true] attribute value and enables validation according to the data-val-* - /// attribute values. - /// - /// Any valid jQuery selector. - - // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one - // element with data-val=true - var $selector = $(selector), - $forms = $selector.parents() - .addBack() - .filter("form") - .add($selector.find("form")) - .has("[data-val=true]"); - - $selector.find("[data-val=true]").each(function () { - $jQval.unobtrusive.parseElement(this, true); - }); - - $forms.each(function () { - var info = validationInfo(this); - if (info) { - info.attachValidation(); - } - }); - } - }; - - adapters = $jQval.unobtrusive.adapters; - - adapters.add = function (adapterName, params, fn) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// [Optional] An array of parameter names (strings) that will - /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and - /// mmmm is the parameter name). - /// The function to call, which adapts the values from the HTML - /// attributes into jQuery Validate rules and/or messages. - /// - if (!fn) { // Called with no params, just a function - fn = params; - params = []; - } - this.push({ name: adapterName, params: params, adapt: fn }); - return this; - }; - - adapters.addBool = function (adapterName, ruleName) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation rule has no parameter values. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// [Optional] The name of the jQuery Validate rule. If not provided, the value - /// of adapterName will be used instead. - /// - return this.add(adapterName, function (options) { - setValidationValues(options, ruleName || adapterName, true); - }); - }; - - adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and - /// one for min-and-max). The HTML parameters are expected to be named -min and -max. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name). - /// The name of the jQuery Validate rule to be used when you only - /// have a minimum value. - /// The name of the jQuery Validate rule to be used when you only - /// have a maximum value. - /// The name of the jQuery Validate rule to be used when you - /// have both a minimum and maximum value. - /// [Optional] The name of the HTML attribute that - /// contains the minimum value. The default is "min". - /// [Optional] The name of the HTML attribute that - /// contains the maximum value. The default is "max". - /// - return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) { - var min = options.params.min, - max = options.params.max; - - if (min && max) { - setValidationValues(options, minMaxRuleName, [min, max]); - } - else if (min) { - setValidationValues(options, minRuleName, min); - } - else if (max) { - setValidationValues(options, maxRuleName, max); - } - }); - }; - - adapters.addSingleVal = function (adapterName, attribute, ruleName) { - /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where - /// the jQuery Validate validation rule has a single value. - /// The name of the adapter to be added. This matches the name used - /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name). - /// [Optional] The name of the HTML attribute that contains the value. - /// The default is "val". - /// [Optional] The name of the jQuery Validate rule. If not provided, the value - /// of adapterName will be used instead. - /// - return this.add(adapterName, [attribute || "val"], function (options) { - setValidationValues(options, ruleName || adapterName, options.params[attribute]); - }); - }; - - $jQval.addMethod("__dummy__", function (value, element, params) { - return true; - }); - - $jQval.addMethod("regex", function (value, element, params) { - var match; - if (this.optional(element)) { - return true; - } - - match = new RegExp(params).exec(value); - return (match && (match.index === 0) && (match[0].length === value.length)); - }); - - $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) { - var match; - if (nonalphamin) { - match = value.match(/\W/g); - match = match && match.length >= nonalphamin; - } - return match; - }); - - if ($jQval.methods.extension) { - adapters.addSingleVal("accept", "mimtype"); - adapters.addSingleVal("extension", "extension"); - } else { - // for backward compatibility, when the 'extension' validation method does not exist, such as with versions - // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for - // validating the extension, and ignore mime-type validations as they are not supported. - adapters.addSingleVal("extension", "extension", "accept"); - } - - adapters.addSingleVal("regex", "pattern"); - adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"); - adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range"); - adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength"); - adapters.add("equalto", ["other"], function (options) { - var prefix = getModelPrefix(options.element.name), - other = options.params.other, - fullOtherName = appendModelPrefix(other, prefix), - element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0]; - - setValidationValues(options, "equalTo", element); - }); - adapters.add("required", function (options) { - // jQuery Validate equates "required" with "mandatory" for checkbox elements - if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") { - setValidationValues(options, "required", true); - } - }); - adapters.add("remote", ["url", "type", "additionalfields"], function (options) { - var value = { - url: options.params.url, - type: options.params.type || "GET", - data: {} - }, - prefix = getModelPrefix(options.element.name); - - $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { - var paramName = appendModelPrefix(fieldName, prefix); - value.data[paramName] = function () { - var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']"); - // For checkboxes and radio buttons, only pick up values from checked fields. - if (field.is(":checkbox")) { - return field.filter(":checked").val() || field.filter(":hidden").val() || ''; - } - else if (field.is(":radio")) { - return field.filter(":checked").val() || ''; - } - return field.val(); - }; - }); - - setValidationValues(options, "remote", value); - }); - adapters.add("password", ["min", "nonalphamin", "regex"], function (options) { - if (options.params.min) { - setValidationValues(options, "minlength", options.params.min); - } - if (options.params.nonalphamin) { - setValidationValues(options, "nonalphamin", options.params.nonalphamin); - } - if (options.params.regex) { - setValidationValues(options, "regex", options.params.regex); - } - }); - adapters.add("fileextensions", ["extensions"], function (options) { - setValidationValues(options, "extension", options.params.extensions); - }); - - $(function () { - $jQval.unobtrusive.parse(document); - }); - - return $jQval.unobtrusive; -})); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js deleted file mode 100644 index 8d13c0a98..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); -/* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */ -!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["
    ","
    "],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"
    ":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("
    ");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("
    ").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["","","",""],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r0&&cr?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]=0&&a[0]+e[1]a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){ -return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o=0&&a[0]+ae(n)[0]=0&&a[1]+ae(n)[1]=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}); \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css deleted file mode 100644 index 8f013dafa..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css +++ /dev/null @@ -1,1267 +0,0 @@ -/* -== malihu jquery custom scrollbar plugin == -Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller -*/ - - - -/* -CONTENTS: - 1. BASIC STYLE - Plugin's basic/essential CSS properties (normally, should not be edited). - 2. VERTICAL SCROLLBAR - Positioning and dimensions of vertical scrollbar. - 3. HORIZONTAL SCROLLBAR - Positioning and dimensions of horizontal scrollbar. - 4. VERTICAL AND HORIZONTAL SCROLLBARS - Positioning and dimensions of 2-axis scrollbars. - 5. TRANSITIONS - CSS3 transitions for hover events, auto-expanded and auto-hidden scrollbars. - 6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS - 6.1 THEMES - Scrollbar colors, opacity, dimensions, backgrounds etc. via ready-to-use themes. -*/ - - - -/* ------------------------------------------------------------------------------------------------------------------------- -1. BASIC STYLE ------------------------------------------------------------------------------------------------------------------------- -*/ - - .mCustomScrollbar{ -ms-touch-action: pinch-zoom; touch-action: pinch-zoom; /* direct pointer events to js */ } - .mCustomScrollbar.mCS_no_scrollbar, .mCustomScrollbar.mCS_touch_action{ -ms-touch-action: auto; touch-action: auto; } - - .mCustomScrollBox{ /* contains plugin's markup */ - position: relative; - overflow: hidden; - height: 100%; - max-width: 100%; - outline: none; - direction: ltr; - } - - .mCSB_container{ /* contains the original content */ - overflow: hidden; - width: auto; - height: auto; - } - - - -/* ------------------------------------------------------------------------------------------------------------------------- -2. VERTICAL SCROLLBAR -y-axis ------------------------------------------------------------------------------------------------------------------------- -*/ - - .mCSB_inside > .mCSB_container{ margin-right: 30px; } - - .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */ - - .mCS-dir-rtl > .mCSB_inside > .mCSB_container{ /* RTL direction/left-side scrollbar */ - margin-right: 0; - margin-left: 30px; - } - - .mCS-dir-rtl > .mCSB_inside > .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-left: 0; } /* RTL direction/left-side scrollbar */ - - .mCSB_scrollTools{ /* contains scrollbar markup (draggable element, dragger rail, buttons etc.) */ - position: absolute; - width: 16px; - height: auto; - left: auto; - top: 0; - right: 0; - bottom: 0; - } - - .mCSB_outside + .mCSB_scrollTools{ right: -26px; } /* scrollbar position: outside */ - - .mCS-dir-rtl > .mCSB_inside > .mCSB_scrollTools, - .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ /* RTL direction/left-side scrollbar */ - right: auto; - left: 0; - } - - .mCS-dir-rtl > .mCSB_outside + .mCSB_scrollTools{ left: -26px; } /* RTL direction/left-side scrollbar (scrollbar position: outside) */ - - .mCSB_scrollTools .mCSB_draggerContainer{ /* contains the draggable element and dragger rail markup */ - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - height: auto; - } - - .mCSB_scrollTools a + .mCSB_draggerContainer{ margin: 20px 0; } - - .mCSB_scrollTools .mCSB_draggerRail{ - width: 2px; - height: 100%; - margin: 0 auto; - -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; - } - - .mCSB_scrollTools .mCSB_dragger{ /* the draggable element */ - cursor: pointer; - width: 100%; - height: 30px; /* minimum dragger height */ - z-index: 1; - } - - .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ /* the dragger element */ - position: relative; - width: 4px; - height: 100%; - margin: 0 auto; - -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; - text-align: center; - } - - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ width: 12px; /* auto-expanded scrollbar */ } - - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 8px; /* auto-expanded scrollbar */ } - - .mCSB_scrollTools .mCSB_buttonUp, - .mCSB_scrollTools .mCSB_buttonDown{ - display: block; - position: absolute; - height: 20px; - width: 100%; - overflow: hidden; - margin: 0 auto; - cursor: pointer; - } - - .mCSB_scrollTools .mCSB_buttonDown{ bottom: 0; } - - - -/* ------------------------------------------------------------------------------------------------------------------------- -3. HORIZONTAL SCROLLBAR -x-axis ------------------------------------------------------------------------------------------------------------------------- -*/ - - .mCSB_horizontal.mCSB_inside > .mCSB_container{ - margin-right: 0; - margin-bottom: 30px; - } - - .mCSB_horizontal.mCSB_outside > .mCSB_container{ min-height: 100%; } - - .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } /* non-visible scrollbar */ - - .mCSB_scrollTools.mCSB_scrollTools_horizontal{ - width: auto; - height: 16px; - top: auto; - right: 0; - bottom: 0; - left: 0; - } - - .mCustomScrollBox + .mCSB_scrollTools.mCSB_scrollTools_horizontal, - .mCustomScrollBox + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ bottom: -26px; } /* scrollbar position: outside */ - - .mCSB_scrollTools.mCSB_scrollTools_horizontal a + .mCSB_draggerContainer{ margin: 0 20px; } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - width: 100%; - height: 2px; - margin: 7px 0; - } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{ - width: 30px; /* minimum dragger width */ - height: 100%; - left: 0; - } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - width: 100%; - height: 4px; - margin: 6px auto; - } - - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ - height: 12px; /* auto-expanded scrollbar */ - margin: 2px auto; - } - - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ - height: 8px; /* auto-expanded scrollbar */ - margin: 4px 0; - } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft, - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ - display: block; - position: absolute; - width: 20px; - height: 100%; - overflow: hidden; - margin: 0 auto; - cursor: pointer; - } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{ left: 0; } - - .mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{ right: 0; } - - - -/* ------------------------------------------------------------------------------------------------------------------------- -4. VERTICAL AND HORIZONTAL SCROLLBARS -yx-axis ------------------------------------------------------------------------------------------------------------------------- -*/ - - .mCSB_container_wrapper{ - position: absolute; - height: auto; - width: auto; - overflow: hidden; - top: 0; - left: 0; - right: 0; - bottom: 0; - margin-right: 30px; - margin-bottom: 30px; - } - - .mCSB_container_wrapper > .mCSB_container{ - padding-right: 30px; - padding-bottom: 30px; - -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - } - - .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 20px; } - - .mCSB_vertical_horizontal > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 20px; } - - /* non-visible horizontal scrollbar */ - .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden + .mCSB_scrollTools.mCSB_scrollTools_vertical{ bottom: 0; } - - /* non-visible vertical scrollbar/RTL direction/left-side scrollbar */ - .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal, - .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ right: 0; } - - /* RTL direction/left-side scrollbar */ - .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 20px; } - - /* non-visible scrollbar/RTL direction/left-side scrollbar */ - .mCS-dir-rtl > .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden + .mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{ left: 0; } - - .mCS-dir-rtl > .mCSB_inside > .mCSB_container_wrapper{ /* RTL direction/left-side scrollbar */ - margin-right: 0; - margin-left: 30px; - } - - .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden > .mCSB_container{ padding-right: 0; } - - .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden > .mCSB_container{ padding-bottom: 0; } - - .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{ - margin-right: 0; /* non-visible scrollbar */ - margin-left: 0; - } - - /* non-visible horizontal scrollbar */ - .mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside > .mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{ margin-bottom: 0; } - - - -/* ------------------------------------------------------------------------------------------------------------------------- -5. TRANSITIONS ------------------------------------------------------------------------------------------------------------------------- -*/ - - .mCSB_scrollTools, - .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCSB_scrollTools .mCSB_buttonUp, - .mCSB_scrollTools .mCSB_buttonDown, - .mCSB_scrollTools .mCSB_buttonLeft, - .mCSB_scrollTools .mCSB_buttonRight{ - -webkit-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; - -moz-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; - -o-transition: opacity .2s ease-in-out, background-color .2s ease-in-out; - transition: opacity .2s ease-in-out, background-color .2s ease-in-out; - } - - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, /* auto-expanded scrollbar */ - .mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail, - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar, - .mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{ - -webkit-transition: width .2s ease-out .2s, height .2s ease-out .2s, - margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, - margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, - opacity .2s ease-in-out, background-color .2s ease-in-out; - -moz-transition: width .2s ease-out .2s, height .2s ease-out .2s, - margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, - margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, - opacity .2s ease-in-out, background-color .2s ease-in-out; - -o-transition: width .2s ease-out .2s, height .2s ease-out .2s, - margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, - margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, - opacity .2s ease-in-out, background-color .2s ease-in-out; - transition: width .2s ease-out .2s, height .2s ease-out .2s, - margin-left .2s ease-out .2s, margin-right .2s ease-out .2s, - margin-top .2s ease-out .2s, margin-bottom .2s ease-out .2s, - opacity .2s ease-in-out, background-color .2s ease-in-out; - } - - - -/* ------------------------------------------------------------------------------------------------------------------------- -6. SCROLLBAR COLORS, OPACITY AND BACKGROUNDS ------------------------------------------------------------------------------------------------------------------------- -*/ - - /* - ---------------------------------------- - 6.1 THEMES - ---------------------------------------- - */ - - /* default theme ("light") */ - - .mCSB_scrollTools{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; } - - .mCS-autoHide > .mCustomScrollBox > .mCSB_scrollTools, - .mCS-autoHide > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 0; filter: "alpha(opacity=0)"; -ms-filter: "alpha(opacity=0)"; } - - .mCustomScrollbar > .mCustomScrollBox > .mCSB_scrollTools.mCSB_scrollTools_onDrag, - .mCustomScrollbar > .mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag, - .mCustomScrollBox:hover > .mCSB_scrollTools, - .mCustomScrollBox:hover ~ .mCSB_scrollTools, - .mCS-autoHide:hover > .mCustomScrollBox > .mCSB_scrollTools, - .mCS-autoHide:hover > .mCustomScrollBox ~ .mCSB_scrollTools{ opacity: 1; filter: "alpha(opacity=100)"; -ms-filter: "alpha(opacity=100)"; } - - .mCSB_scrollTools .mCSB_draggerRail{ - background-color: #000; background-color: rgba(0,0,0,0.4); - filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)"; - } - - .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-color: #fff; background-color: rgba(255,255,255,0.75); - filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; - } - - .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ - background-color: #fff; background-color: rgba(255,255,255,0.85); - filter: "alpha(opacity=85)"; -ms-filter: "alpha(opacity=85)"; - } - .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ - background-color: #fff; background-color: rgba(255,255,255,0.9); - filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; - } - - .mCSB_scrollTools .mCSB_buttonUp, - .mCSB_scrollTools .mCSB_buttonDown, - .mCSB_scrollTools .mCSB_buttonLeft, - .mCSB_scrollTools .mCSB_buttonRight{ - background-image: url(mCSB_buttons.png); /* css sprites */ - background-repeat: no-repeat; - opacity: 0.4; filter: "alpha(opacity=40)"; -ms-filter: "alpha(opacity=40)"; - } - - .mCSB_scrollTools .mCSB_buttonUp{ - background-position: 0 0; - /* - sprites locations - light: 0 0, -16px 0, -32px 0, -48px 0, 0 -72px, -16px -72px, -32px -72px - dark: -80px 0, -96px 0, -112px 0, -128px 0, -80px -72px, -96px -72px, -112px -72px - */ - } - - .mCSB_scrollTools .mCSB_buttonDown{ - background-position: 0 -20px; - /* - sprites locations - light: 0 -20px, -16px -20px, -32px -20px, -48px -20px, 0 -92px, -16px -92px, -32px -92px - dark: -80px -20px, -96px -20px, -112px -20px, -128px -20px, -80px -92px, -96px -92px, -112 -92px - */ - } - - .mCSB_scrollTools .mCSB_buttonLeft{ - background-position: 0 -40px; - /* - sprites locations - light: 0 -40px, -20px -40px, -40px -40px, -60px -40px, 0 -112px, -20px -112px, -40px -112px - dark: -80px -40px, -100px -40px, -120px -40px, -140px -40px, -80px -112px, -100px -112px, -120px -112px - */ - } - - .mCSB_scrollTools .mCSB_buttonRight{ - background-position: 0 -56px; - /* - sprites locations - light: 0 -56px, -20px -56px, -40px -56px, -60px -56px, 0 -128px, -20px -128px, -40px -128px - dark: -80px -56px, -100px -56px, -120px -56px, -140px -56px, -80px -128px, -100px -128px, -120px -128px - */ - } - - .mCSB_scrollTools .mCSB_buttonUp:hover, - .mCSB_scrollTools .mCSB_buttonDown:hover, - .mCSB_scrollTools .mCSB_buttonLeft:hover, - .mCSB_scrollTools .mCSB_buttonRight:hover{ opacity: 0.75; filter: "alpha(opacity=75)"; -ms-filter: "alpha(opacity=75)"; } - - .mCSB_scrollTools .mCSB_buttonUp:active, - .mCSB_scrollTools .mCSB_buttonDown:active, - .mCSB_scrollTools .mCSB_buttonLeft:active, - .mCSB_scrollTools .mCSB_buttonRight:active{ opacity: 0.9; filter: "alpha(opacity=90)"; -ms-filter: "alpha(opacity=90)"; } - - - /* theme: "dark" */ - - .mCS-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } - - .mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.85); } - - .mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: rgba(0,0,0,0.9); } - - .mCS-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; } - - .mCS-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; } - - .mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; } - - .mCS-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; } - - /* ---------------------------------------- */ - - - - /* theme: "light-2", "dark-2" */ - - .mCS-light-2.mCSB_scrollTools .mCSB_draggerRail, - .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{ - width: 4px; - background-color: #fff; background-color: rgba(255,255,255,0.1); - -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; - } - - .mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - width: 4px; - background-color: #fff; background-color: rgba(255,255,255,0.75); - -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; - } - - .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - width: 100%; - height: 4px; - margin: 6px auto; - } - - .mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } - - .mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } - - .mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px 0; } - - .mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -20px; } - - .mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -40px; } - - .mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -56px; } - - - /* theme: "dark-2" */ - - .mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{ - background-color: #000; background-color: rgba(0,0,0,0.1); - -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; - } - - .mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-color: #000; background-color: rgba(0,0,0,0.75); - -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; - } - - .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px 0; } - - .mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -20px; } - - .mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -40px; } - - .mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -56px; } - - /* ---------------------------------------- */ - - - - /* theme: "light-thick", "dark-thick" */ - - .mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail, - .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{ - width: 4px; - background-color: #fff; background-color: rgba(255,255,255,0.1); - -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; - } - - .mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - width: 6px; - background-color: #fff; background-color: rgba(255,255,255,0.75); - -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; - } - - .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - width: 100%; - height: 4px; - margin: 6px 0; - } - - .mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - width: 100%; - height: 6px; - margin: 5px auto; - } - - .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } - - .mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } - - .mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px 0; } - - .mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -20px; } - - .mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -40px; } - - .mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -56px; } - - - /* theme: "dark-thick" */ - - .mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{ - background-color: #000; background-color: rgba(0,0,0,0.1); - -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; - } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-color: #000; background-color: rgba(0,0,0,0.75); - -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; - } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px 0; } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -20px; } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -40px; } - - .mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -56px; } - - /* ---------------------------------------- */ - - - - /* theme: "light-thin", "dark-thin" */ - - .mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.1); } - - .mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 2px; } - - .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{ width: 100%; } - - .mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - width: 100%; - height: 2px; - margin: 7px auto; - } - - - /* theme "dark-thin" */ - - .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px 0; } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -20px; } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -40px; } - - .mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -56px; } - - /* ---------------------------------------- */ - - - - /* theme "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark" */ - - .mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.15); } - - .mCS-rounded.mCSB_scrollTools .mCSB_dragger, - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger, - .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{ height: 14px; } - - .mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - width: 14px; - margin: 0 1px; - } - - .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger, - .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger, - .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger, - .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 14px; } - - .mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - height: 14px; - margin: 1px 0; - } - - .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ - width: 16px; /* auto-expanded scrollbar */ - height: 16px; - margin: -1px 0; - } - - .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, - .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ width: 4px; /* auto-expanded scrollbar */ } - - .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{ - height: 16px; /* auto-expanded scrollbar */ - width: 16px; - margin: 0 -1px; - } - - .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, - .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ - height: 4px; /* auto-expanded scrollbar */ - margin: 6px 0; - } - - .mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{ background-position: 0 -72px; } - - .mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{ background-position: 0 -92px; } - - .mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{ background-position: 0 -112px; } - - .mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{ background-position: 0 -128px; } - - - /* theme "rounded-dark", "rounded-dots-dark" */ - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.15); } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -80px -72px; } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -80px -92px; } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -80px -112px; } - - .mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -80px -128px; } - - - /* theme "rounded-dots", "rounded-dots-dark" */ - - .mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail, - .mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{ width: 4px; } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - background-color: transparent; - background-position: center; - } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail, - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{ - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg=="); - background-repeat: repeat-y; - opacity: 0.3; - filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; - } - - .mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - height: 4px; - margin: 6px 0; - background-repeat: repeat-x; - } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{ background-position: -16px -72px; } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{ background-position: -16px -92px; } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -20px -112px; } - - .mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{ background-position: -20px -128px; } - - - /* theme "rounded-dots-dark" */ - - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{ - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII="); - } - - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -96px -72px; } - - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -96px -92px; } - - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -100px -112px; } - - .mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -100px -128px; } - - /* ---------------------------------------- */ - - - - /* theme "3d", "3d-dark", "3d-thick", "3d-thick-dark" */ - - .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-repeat: repeat-y; - background-image: -moz-linear-gradient(left, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); - background-image: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0))); - background-image: -webkit-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: -o-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: -ms-linear-gradient(left, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: linear-gradient(to right, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - } - - .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - background-repeat: repeat-x; - background-image: -moz-linear-gradient(top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(100%,rgba(255,255,255,0))); - background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: -o-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: -ms-linear-gradient(top, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - background-image: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0) 100%); - } - - - /* theme "3d", "3d-dark" */ - - .mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger, - .mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 70px; } - - .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger, - .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 70px; } - - .mCS-3d.mCSB_scrollTools, - .mCS-3d-dark.mCSB_scrollTools{ - opacity: 1; - filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; - } - - .mCS-3d.mCSB_scrollTools .mCSB_draggerRail, - .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 16px; -moz-border-radius: 16px; border-radius: 16px; } - - .mCS-3d.mCSB_scrollTools .mCSB_draggerRail, - .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{ - width: 8px; - background-color: #000; background-color: rgba(0,0,0,0.2); - box-shadow: inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.2); - } - - .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; } - - .mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 8px; } - - .mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - width: 100%; - height: 8px; - margin: 4px 0; - box-shadow: inset 0 1px 1px rgba(0,0,0,0.5), inset 0 -1px 1px rgba(255,255,255,0.2); - } - - .mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - width: 100%; - height: 8px; - margin: 4px auto; - } - - .mCS-3d.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } - - .mCS-3d.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } - - .mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } - - .mCS-3d.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } - - - /* theme "3d-dark" */ - - .mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{ - background-color: #000; background-color: rgba(0,0,0,0.1); - box-shadow: inset 1px 0 1px rgba(0,0,0,0.1); - } - - .mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); } - - .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } - - .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } - - .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } - - .mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } - - /* ---------------------------------------- */ - - - - /* theme: "3d-thick", "3d-thick-dark" */ - - .mCS-3d-thick.mCSB_scrollTools, - .mCS-3d-thick-dark.mCSB_scrollTools{ - opacity: 1; - filter: "alpha(opacity=30)"; -ms-filter: "alpha(opacity=30)"; - } - - .mCS-3d-thick.mCSB_scrollTools, - .mCS-3d-thick-dark.mCSB_scrollTools, - .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } - - .mCSB_inside + .mCS-3d-thick.mCSB_scrollTools_vertical, - .mCSB_inside + .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ right: 1px; } - - .mCS-3d-thick.mCSB_scrollTools_vertical, - .mCS-3d-thick-dark.mCSB_scrollTools_vertical{ box-shadow: inset 1px 0 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); } - - .mCS-3d-thick.mCSB_scrollTools_horizontal, - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ - bottom: 1px; - box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.5); - } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - box-shadow: inset 1px 0 0 rgba(255,255,255,0.4); - width: 12px; - margin: 2px; - position: absolute; - height: auto; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - - .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #555; } - - .mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - height: 12px; - width: auto; - } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{ - background-color: #000; background-color: rgba(0,0,0,0.05); - box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1); - } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } - - .mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } - - - /* theme: "3d-thick-dark" */ - - .mCS-3d-thick-dark.mCSB_scrollTools{ box-shadow: inset 0 0 14px rgba(0,0,0,0.2); } - - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal{ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1), inset 0 0 14px rgba(0,0,0,0.2); } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 1px 0 0 rgba(255,255,255,0.4), inset -1px 0 0 rgba(0,0,0,0.2); } - - .mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2); } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #777; } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{ - background-color: #fff; background-color: rgba(0,0,0,0.05); - box-shadow: inset 1px 1px 16px rgba(0,0,0,0.1); - } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } - - .mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } - - /* ---------------------------------------- */ - - - - /* theme: "minimal", "minimal-dark" */ - - .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical, - .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{ - right: 0; - margin: 12px 0; - } - - .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools.mCSB_scrollTools_horizontal, - .mCustomScrollBox.mCS-minimal + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal, - .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools.mCSB_scrollTools_horizontal, - .mCustomScrollBox.mCS-minimal-dark + .mCSB_scrollTools + .mCSB_scrollTools.mCSB_scrollTools_horizontal{ - bottom: 0; - margin: 0 12px; - } - - /* RTL direction/left-side scrollbar */ - .mCS-dir-rtl > .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical, - .mCS-dir-rtl > .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical{ - left: 0; - right: auto; - } - - .mCS-minimal.mCSB_scrollTools .mCSB_draggerRail, - .mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: transparent; } - - .mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger, - .mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{ height: 50px; } - - .mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger, - .mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{ width: 50px; } - - .mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-color: #fff; background-color: rgba(255,255,255,0.2); - filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)"; - } - - .mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ - background-color: #fff; background-color: rgba(255,255,255,0.5); - filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)"; - } - - - /* theme: "minimal-dark" */ - - .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - background-color: #000; background-color: rgba(0,0,0,0.2); - filter: "alpha(opacity=20)"; -ms-filter: "alpha(opacity=20)"; - } - - .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ - background-color: #000; background-color: rgba(0,0,0,0.5); - filter: "alpha(opacity=50)"; -ms-filter: "alpha(opacity=50)"; - } - - /* ---------------------------------------- */ - - - - /* theme "light-3", "dark-3" */ - - .mCS-light-3.mCSB_scrollTools .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ - width: 6px; - background-color: #000; background-color: rgba(0,0,0,0.2); - } - - .mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ width: 6px; } - - .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - width: 100%; - height: 6px; - margin: 5px 0; - } - - .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ - width: 12px; - } - - .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded + .mCSB_draggerRail, - .mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{ - height: 12px; - margin: 2px 0; - } - - .mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } - - .mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } - - .mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } - - .mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } - - - /* theme "dark-3" */ - - .mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); } - - .mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } - - .mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } - - .mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } - - .mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } - - /* ---------------------------------------- */ - - - - /* theme "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */ - - .mCS-inset.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ - width: 12px; - background-color: #000; background-color: rgba(0,0,0,0.2); - } - - .mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ - width: 6px; - margin: 3px 5px; - position: absolute; - height: auto; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - - .mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{ - height: 6px; - margin: 5px 3px; - position: absolute; - width: auto; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - - .mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail, - .mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{ - width: 100%; - height: 12px; - margin: 2px 0; - } - - .mCS-inset.mCSB_scrollTools .mCSB_buttonUp, - .mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp, - .mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp{ background-position: -32px -72px; } - - .mCS-inset.mCSB_scrollTools .mCSB_buttonDown, - .mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown, - .mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown{ background-position: -32px -92px; } - - .mCS-inset.mCSB_scrollTools .mCSB_buttonLeft, - .mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft, - .mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -40px -112px; } - - .mCS-inset.mCSB_scrollTools .mCSB_buttonRight, - .mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight, - .mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight{ background-position: -40px -128px; } - - - /* theme "inset-dark", "inset-2-dark", "inset-3-dark" */ - - .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.1); } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp{ background-position: -112px -72px; } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown{ background-position: -112px -92px; } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft{ background-position: -120px -112px; } - - .mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight{ background-position: -120px -128px; } - - - /* theme "inset-2", "inset-2-dark" */ - - .mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail, - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ - background-color: transparent; - border-width: 1px; - border-style: solid; - border-color: #fff; - border-color: rgba(255,255,255,0.2); - -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - } - - .mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{ border-color: #000; border-color: rgba(0,0,0,0.2); } - - - /* theme "inset-3", "inset-3-dark" */ - - .mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{ background-color: #fff; background-color: rgba(255,255,255,0.6); } - - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{ background-color: #000; background-color: rgba(0,0,0,0.6); } - - .mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.75); } - - .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.85); } - - .mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #000; background-color: rgba(0,0,0,0.9); } - - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.75); } - - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.85); } - - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, - .mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{ background-color: #fff; background-color: rgba(255,255,255,0.9); } - - /* ---------------------------------------- */ diff --git a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js b/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js deleted file mode 100644 index ff7a7263f..000000000 --- a/aspnet-core/services/LY.MicroService.AuthServer/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js +++ /dev/null @@ -1,2458 +0,0 @@ -/* -== malihu jquery custom scrollbar plugin == -Version: 3.1.5 -Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller -Author: malihu -Author URI: http://manos.malihu.gr -License: MIT License (MIT) -*/ - -/* -Copyright Manos Malihutsakis (email: manos@malihu.gr) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -/* -The code below is fairly long, fully commented and should be normally used in development. -For production, use either the minified jquery.mCustomScrollbar.min.js script or -the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin -and dependencies (minified). -*/ - -(function(factory){ - if(typeof define==="function" && define.amd){ - define(["jquery"],factory); - }else if(typeof module!=="undefined" && module.exports){ - module.exports=factory; - }else{ - factory(jQuery,window,document); - } -}(function($){ -(function(init){ - var _rjs=typeof define==="function" && define.amd, /* RequireJS */ - _njs=typeof module !== "undefined" && module.exports, /* NodeJS */ - _dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */ - _url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"; - if(!_rjs){ - if(_njs){ - require("jquery-mousewheel")($); - }else{ - /* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS - (works when mCustomScrollbar fn is called on window load) */ - $.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E")); - } - } - init(); -}(function(){ - - /* - ---------------------------------------- - PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S) - ---------------------------------------- - */ - - var pluginNS="mCustomScrollbar", - pluginPfx="mCS", - defaultSelector=".mCustomScrollbar", - - - - - - /* - ---------------------------------------- - DEFAULT OPTIONS - ---------------------------------------- - */ - - defaults={ - /* - set element/content width/height programmatically - values: boolean, pixels, percentage - option default - ------------------------------------- - setWidth false - setHeight false - */ - /* - set the initial css top property of content - values: string (e.g. "-100px", "10%" etc.) - */ - setTop:0, - /* - set the initial css left property of content - values: string (e.g. "-100px", "10%" etc.) - */ - setLeft:0, - /* - scrollbar axis (vertical and/or horizontal scrollbars) - values (string): "y", "x", "yx" - */ - axis:"y", - /* - position of scrollbar relative to content - values (string): "inside", "outside" ("outside" requires elements with position:relative) - */ - scrollbarPosition:"inside", - /* - scrolling inertia - values: integer (milliseconds) - */ - scrollInertia:950, - /* - auto-adjust scrollbar dragger length - values: boolean - */ - autoDraggerLength:true, - /* - auto-hide scrollbar when idle - values: boolean - option default - ------------------------------------- - autoHideScrollbar false - */ - /* - auto-expands scrollbar on mouse-over and dragging - values: boolean - option default - ------------------------------------- - autoExpandScrollbar false - */ - /* - always show scrollbar, even when there's nothing to scroll - values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean - */ - alwaysShowScrollbar:0, - /* - scrolling always snaps to a multiple of this number in pixels - values: integer, array ([y,x]) - option default - ------------------------------------- - snapAmount null - */ - /* - when snapping, snap with this number in pixels as an offset - values: integer - */ - snapOffset:0, - /* - mouse-wheel scrolling - */ - mouseWheel:{ - /* - enable mouse-wheel scrolling - values: boolean - */ - enable:true, - /* - scrolling amount in pixels - values: "auto", integer - */ - scrollAmount:"auto", - /* - mouse-wheel scrolling axis - the default scrolling direction when both vertical and horizontal scrollbars are present - values (string): "y", "x" - */ - axis:"y", - /* - prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached - values: boolean - option default - ------------------------------------- - preventDefault null - */ - /* - the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. - values: "auto", integer - "auto" uses the default OS/browser value - */ - deltaFactor:"auto", - /* - normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) - values: boolean - option default - ------------------------------------- - normalizeDelta null - */ - /* - invert mouse-wheel scrolling direction - values: boolean - option default - ------------------------------------- - invert null - */ - /* - the tags that disable mouse-wheel when cursor is over them - */ - disableOver:["select","option","keygen","datalist","textarea"] - }, - /* - scrollbar buttons - */ - scrollButtons:{ - /* - enable scrollbar buttons - values: boolean - option default - ------------------------------------- - enable null - */ - /* - scrollbar buttons scrolling type - values (string): "stepless", "stepped" - */ - scrollType:"stepless", - /* - scrolling amount in pixels - values: "auto", integer - */ - scrollAmount:"auto" - /* - tabindex of the scrollbar buttons - values: false, integer - option default - ------------------------------------- - tabindex null - */ - }, - /* - keyboard scrolling - */ - keyboard:{ - /* - enable scrolling via keyboard - values: boolean - */ - enable:true, - /* - keyboard scrolling type - values (string): "stepless", "stepped" - */ - scrollType:"stepless", - /* - scrolling amount in pixels - values: "auto", integer - */ - scrollAmount:"auto" - }, - /* - enable content touch-swipe scrolling - values: boolean, integer, string (number) - integer values define the axis-specific minimum amount required for scrolling momentum - */ - contentTouchScroll:25, - /* - enable/disable document (default) touch-swipe scrolling - */ - documentTouchScroll:true, - /* - advanced option parameters - */ - advanced:{ - /* - auto-expand content horizontally (for "x" or "yx" axis) - values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method) - option default - ------------------------------------- - autoExpandHorizontalScroll null - */ - /* - auto-scroll to elements with focus - */ - autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", - /* - auto-update scrollbars on content, element or viewport resize - should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. - values: boolean - */ - updateOnContentResize:true, - /* - auto-update scrollbars each time each image inside the element is fully loaded - values: "auto", boolean - */ - updateOnImageLoad:"auto", - /* - auto-update scrollbars based on the amount and size changes of specific selectors - useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size - values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) - a value of true (boolean) will auto-update scrollbars each time any element is changed - option default - ------------------------------------- - updateOnSelectorChange null - */ - /* - extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2") - option default - ------------------------------------- - extraDraggableSelectors null - */ - /* - extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2") - option default - ------------------------------------- - releaseDraggableSelectors null - */ - /* - auto-update timeout - values: integer (milliseconds) - */ - autoUpdateTimeout:60 - }, - /* - scrollbar theme - values: string (see CSS/plugin URI for a list of ready-to-use themes) - */ - theme:"light", - /* - user defined callback functions - */ - callbacks:{ - /* - Available callbacks: - callback default - ------------------------------------- - onCreate null - onInit null - onScrollStart null - onScroll null - onTotalScroll null - onTotalScrollBack null - whileScrolling null - onOverflowY null - onOverflowX null - onOverflowYNone null - onOverflowXNone null - onImageLoad null - onSelectorChange null - onBeforeUpdate null - onUpdate null - */ - onTotalScrollOffset:0, - onTotalScrollBackOffset:0, - alwaysTriggerOffsets:true - } - /* - add scrollbar(s) on all elements matching the current selector, now and in the future - values: boolean, string - string values: "on" (enable), "once" (disable after first invocation), "off" (disable) - liveSelector values: string (selector) - option default - ------------------------------------- - live false - liveSelector null - */ - }, - - - - - - /* - ---------------------------------------- - VARS, CONSTANTS - ---------------------------------------- - */ - - totalInstances=0, /* plugin instances amount */ - liveTimers={}, /* live option timers */ - oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */ - touchActive=false,touchable, /* global touch vars (for touch and pointer events) */ - /* general plugin classes */ - classes=[ - "mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar", - "mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer", - "mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight" - ], - - - - - - /* - ---------------------------------------- - METHODS - ---------------------------------------- - */ - - methods={ - - /* - plugin initialization method - creates the scrollbar(s), plugin data object and options - ---------------------------------------- - */ - - init:function(options){ - - var options=$.extend(true,{},defaults,options), - selector=_selector.call(this); /* validate selector */ - - /* - if live option is enabled, monitor for elements matching the current selector and - apply scrollbar(s) when found (now and in the future) - */ - if(options.live){ - var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */ - $liveSelector=$(liveSelector); /* live selector(s) as jquery object */ - if(options.live==="off"){ - /* - disable live if requested - usage: $(selector).mCustomScrollbar({live:"off"}); - */ - removeLiveTimers(liveSelector); - return; - } - liveTimers[liveSelector]=setTimeout(function(){ - /* call mCustomScrollbar fn on live selector(s) every half-second */ - $liveSelector.mCustomScrollbar(options); - if(options.live==="once" && $liveSelector.length){ - /* disable live after first invocation */ - removeLiveTimers(liveSelector); - } - },500); - }else{ - removeLiveTimers(liveSelector); - } - - /* options backward compatibility (for versions < 3.0.0) and normalization */ - options.setWidth=(options.set_width) ? options.set_width : options.setWidth; - options.setHeight=(options.set_height) ? options.set_height : options.setHeight; - options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis); - options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia; - if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */ - options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false} - } - options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels; - options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta; - options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType); - - _theme(options); /* theme-specific options */ - - /* plugin constructor */ - return $(selector).each(function(){ - - var $this=$(this); - - if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */ - - /* store options and create objects in jquery data */ - $this.data(pluginPfx,{ - idx:++totalInstances, /* instance index */ - opt:options, /* options */ - scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */ - overflowed:null, /* overflowed axis */ - contentReset:{y:null,x:null}, /* object to check when content resets */ - bindEvents:false, /* object to check if events are bound */ - tweenRunning:false, /* object to check if tween is running */ - sequential:{}, /* sequential scrolling object */ - langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */ - cbOffsets:null, /* object to check whether callback offsets always trigger */ - /* - object to check how scrolling events where last triggered - "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) - usage: object.data("mCS").trigger - */ - trigger:null, - /* - object to check for changes in elements in order to call the update method automatically - */ - poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}} - }); - - var d=$this.data(pluginPfx),o=d.opt, - /* HTML data attributes */ - htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme"); - - if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */ - if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */ - if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */ - o.theme=htmlDataTheme; - _theme(o); /* theme-specific options */ - } - - _pluginMarkup.call(this); /* add plugin markup */ - - if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */ - - $("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */ - - methods.update.call(null,$this); /* call the update method */ - - } - - }); - - }, - /* ---------------------------------------- */ - - - - /* - plugin update method - updates content and scrollbar(s) values, events and status - ---------------------------------------- - usage: $(selector).mCustomScrollbar("update"); - */ - - update:function(el,cb){ - - var selector=el || _selector.call(this); /* validate selector */ - - return $(selector).each(function(){ - - var $this=$(this); - - if($this.data(pluginPfx)){ /* check if plugin has initialized */ - - var d=$this.data(pluginPfx),o=d.opt, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; - - if(!mCSB_container.length){return;} - - if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */ - - if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */ - - /* if element was disabled or destroyed, remove class(es) */ - if($this.hasClass(classes[3])){$this.removeClass(classes[3]);} - if($this.hasClass(classes[4])){$this.removeClass(classes[4]);} - - /* css flexbox fix, detect/set max-height */ - mCustomScrollBox.css("max-height","none"); - if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());} - - _expandContentHorizontally.call(this); /* expand content horizontally */ - - if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ - mCSB_container.css("width",_contentWidth(mCSB_container)); - } - - d.overflowed=_overflowed.call(this); /* determine if scrolling is required */ - - _scrollbarVisibility.call(this); /* show/hide scrollbar(s) */ - - /* auto-adjust scrollbar dragger length analogous to content */ - if(o.autoDraggerLength){_setDraggerLength.call(this);} - - _scrollRatio.call(this); /* calculate and store scrollbar to content ratio */ - - _bindEvents.call(this); /* bind scrollbar events */ - - /* reset scrolling position and/or events */ - var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)]; - if(o.axis!=="x"){ /* y/yx axis */ - if(!d.overflowed[0]){ /* y scrolling is not required */ - _resetContentPosition.call(this); /* reset content position */ - if(o.axis==="y"){ - _unbindEvents.call(this); - }else if(o.axis==="yx" && d.overflowed[1]){ - _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); - } - }else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){ - _resetContentPosition.call(this); /* reset content position */ - }else{ /* y scrolling is required */ - _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); - d.contentReset.y=null; - } - } - if(o.axis!=="y"){ /* x/yx axis */ - if(!d.overflowed[1]){ /* x scrolling is not required */ - _resetContentPosition.call(this); /* reset content position */ - if(o.axis==="x"){ - _unbindEvents.call(this); - }else if(o.axis==="yx" && d.overflowed[0]){ - _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); - } - }else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){ - _resetContentPosition.call(this); /* reset content position */ - }else{ /* x scrolling is required */ - _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); - d.contentReset.x=null; - } - } - - /* callbacks: onImageLoad, onSelectorChange, onUpdate */ - if(cb && d){ - if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){ - o.callbacks.onImageLoad.call(this); - }else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){ - o.callbacks.onSelectorChange.call(this); - }else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){ - o.callbacks.onUpdate.call(this); - } - } - - _autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */ - - } - - }); - - }, - /* ---------------------------------------- */ - - - - /* - plugin scrollTo method - triggers a scrolling event to a specific value - ---------------------------------------- - usage: $(selector).mCustomScrollbar("scrollTo",value,options); - */ - - scrollTo:function(val,options){ - - /* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */ - if(typeof val=="undefined" || val==null){return;} - - var selector=_selector.call(this); /* validate selector */ - - return $(selector).each(function(){ - - var $this=$(this); - - if($this.data(pluginPfx)){ /* check if plugin has initialized */ - - var d=$this.data(pluginPfx),o=d.opt, - /* method default options */ - methodDefaults={ - trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */ - scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */ - scrollEasing:"mcsEaseInOut", /* animation easing */ - moveDragger:false, /* move dragger instead of content */ - timeout:60, /* scroll-to delay */ - callbacks:true, /* enable/disable callbacks */ - onStart:true, - onUpdate:true, - onComplete:true - }, - methodOptions=$.extend(true,{},methodDefaults,options), - to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia; - - /* translate yx values to actual scroll-to positions */ - to[0]=_to.call(this,to[0],"y"); - to[1]=_to.call(this,to[1],"x"); - - /* - check if scroll-to value moves the dragger instead of content. - Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.) - */ - if(methodOptions.moveDragger){ - to[0]*=d.scrollRatio.y; - to[1]*=d.scrollRatio.x; - } - - methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden - - setTimeout(function(){ - /* do the scrolling */ - if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */ - methodOptions.dir="y"; - methodOptions.overwrite="all"; - _scrollTo($this,to[0].toString(),methodOptions); - } - if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */ - methodOptions.dir="x"; - methodOptions.overwrite="none"; - _scrollTo($this,to[1].toString(),methodOptions); - } - },methodOptions.timeout); - - } - - }); - - }, - /* ---------------------------------------- */ - - - - /* - plugin stop method - stops scrolling animation - ---------------------------------------- - usage: $(selector).mCustomScrollbar("stop"); - */ - stop:function(){ - - var selector=_selector.call(this); /* validate selector */ - - return $(selector).each(function(){ - - var $this=$(this); - - if($this.data(pluginPfx)){ /* check if plugin has initialized */ - - _stop($this); - - } - - }); - - }, - /* ---------------------------------------- */ - - - - /* - plugin disable method - temporarily disables the scrollbar(s) - ---------------------------------------- - usage: $(selector).mCustomScrollbar("disable",reset); - reset (boolean): resets content position to 0 - */ - disable:function(r){ - - var selector=_selector.call(this); /* validate selector */ - - return $(selector).each(function(){ - - var $this=$(this); - - if($this.data(pluginPfx)){ /* check if plugin has initialized */ - - var d=$this.data(pluginPfx); - - _autoUpdate.call(this,"remove"); /* remove automatic updating */ - - _unbindEvents.call(this); /* unbind events */ - - if(r){_resetContentPosition.call(this);} /* reset content position */ - - _scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */ - - $this.addClass(classes[3]); /* add disable class */ - - } - - }); - - }, - /* ---------------------------------------- */ - - - - /* - plugin destroy method - completely removes the scrollbar(s) and returns the element to its original state - ---------------------------------------- - usage: $(selector).mCustomScrollbar("destroy"); - */ - destroy:function(){ - - var selector=_selector.call(this); /* validate selector */ - - return $(selector).each(function(){ - - var $this=$(this); - - if($this.data(pluginPfx)){ /* check if plugin has initialized */ - - var d=$this.data(pluginPfx),o=d.opt, - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - scrollbar=$(".mCSB_"+d.idx+"_scrollbar"); - - if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */ - - _autoUpdate.call(this,"remove"); /* remove automatic updating */ - - _unbindEvents.call(this); /* unbind events */ - - _resetContentPosition.call(this); /* reset content position */ - - $this.removeData(pluginPfx); /* remove plugin data object */ - - _delete(this,"mcs"); /* delete callbacks object */ - - /* remove plugin markup */ - scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */ - mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */ - mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */ - /* remove plugin classes from the element and add destroy class */ - $this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]); - - } - - }); - - } - /* ---------------------------------------- */ - - }, - - - - - - /* - ---------------------------------------- - FUNCTIONS - ---------------------------------------- - */ - - /* validates selector (if selector is invalid or undefined uses the default one) */ - _selector=function(){ - return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this; - }, - /* -------------------- */ - - - /* changes options according to theme */ - _theme=function(obj){ - var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"], - nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"], - disabledScrollButtonsThemes=["minimal","minimal-dark"], - enabledAutoHideScrollbarThemes=["minimal","minimal-dark"], - scrollbarPositionOutsideThemes=["minimal","minimal-dark"]; - obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength; - obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar; - obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable; - obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar; - obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition; - }, - /* -------------------- */ - - - /* live option timers removal */ - removeLiveTimers=function(selector){ - if(liveTimers[selector]){ - clearTimeout(liveTimers[selector]); - _delete(liveTimers,selector); - } - }, - /* -------------------- */ - - - /* normalizes axis option to valid values: "y", "x", "yx" */ - _findAxis=function(val){ - return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y"; - }, - /* -------------------- */ - - - /* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */ - _findScrollButtonsType=function(val){ - return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless"; - }, - /* -------------------- */ - - - /* generates plugin markup */ - _pluginMarkup=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "", - scrollbar=["
    ","
    "], - wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical", - scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0], - contentWrapper=o.axis==="yx" ? "
    " : "", - autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "", - scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : ""; - if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */ - if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */ - o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */ - $this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("
    "); - var mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"); - if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ - mCSB_container.css("width",_contentWidth(mCSB_container)); - } - if(o.scrollbarPosition==="outside"){ - if($this.css("position")==="static"){ /* requires elements with non-static position */ - $this.css("position","relative"); - } - $this.css("overflow","visible"); - mCustomScrollBox.addClass("mCSB_outside").after(scrollbars); - }else{ - mCustomScrollBox.addClass("mCSB_inside").append(scrollbars); - mCSB_container.wrap(contentWrapper); - } - _scrollButtons.call(this); /* add scrollbar buttons */ - /* minimum dragger length */ - var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; - mCSB_dragger[0].css("min-height",mCSB_dragger[0].height()); - mCSB_dragger[1].css("min-width",mCSB_dragger[1].width()); - }, - /* -------------------- */ - - - /* calculates content width */ - _contentWidth=function(el){ - var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width(); - return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%"; - }, - /* -------------------- */ - - - /* expands content horizontally */ - _expandContentHorizontally=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - mCSB_container=$("#mCSB_"+d.idx+"_container"); - if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){ - /* calculate scrollWidth */ - mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"}); - var w=Math.ceil(mCSB_container[0].scrollWidth); - if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){ - mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"}); - }else{ - /* - wrap content with an infinite width div and set its position to absolute and width to auto. - Setting width to auto before calculating the actual width is important! - We must let the browser set the width as browser zoom values are impossible to calculate. - */ - mCSB_container.css({"overflow-x":"inherit","position":"absolute"}) - .wrap("
    ") - .css({ /* set actual width, original position and un-wrap */ - /* - get the exact width (with decimals) and then round-up. - Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width - */ - "width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)), - "min-width":"100%", - "position":"relative" - }).unwrap(); - } - } - }, - /* -------------------- */ - - - /* adds scrollbar buttons */ - _scrollButtons=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"), - tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'", - btnHTML=[ - "", - "", - "", - "" - ], - btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]]; - if(o.scrollButtons.enable){ - mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]); - } - }, - /* -------------------- */ - - - /* auto-adjusts scrollbar dragger length */ - _setDraggerLength=function(){ - var $this=$(this),d=$this.data(pluginPfx), - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], - ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)], - l=[ - parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()), - parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width()) - ], - h=oldIE && (l[1]contentHeight){contentHeight=h;} - if(w>contentWidth){contentWidth=w;} - return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]; - }, - /* -------------------- */ - - - /* resets content position to 0 */ - _resetContentPosition=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; - _stop($this); /* stop any current scrolling before resetting */ - if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */ - mCSB_dragger[0].add(mCSB_container).css("top",0); - _scrollTo($this,"_resetY"); - } - if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */ - var cx=dx=0; - if(d.langDir==="rtl"){ /* adjust left position for rtl direction */ - cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false); - dx=Math.abs(cx/d.scrollRatio.x); - } - mCSB_container.css("left",cx); - mCSB_dragger[1].css("left",dx); - _scrollTo($this,"_resetX"); - } - }, - /* -------------------- */ - - - /* binds scrollbar events */ - _bindEvents=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt; - if(!d.bindEvents){ /* check if events are already bound */ - _draggable.call(this); - if(o.contentTouchScroll){_contentDraggable.call(this);} - _selectable.call(this); - if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */ - function _mwt(){ - mousewheelTimeout=setTimeout(function(){ - if(!$.event.special.mousewheel){ - _mwt(); - }else{ - clearTimeout(mousewheelTimeout); - _mousewheel.call($this[0]); - } - },100); - } - var mousewheelTimeout; - _mwt(); - } - _draggerRail.call(this); - _wrapperScroll.call(this); - if(o.advanced.autoScrollOnFocus){_focus.call(this);} - if(o.scrollButtons.enable){_buttons.call(this);} - if(o.keyboard.enable){_keyboard.call(this);} - d.bindEvents=true; - } - }, - /* -------------------- */ - - - /* unbinds scrollbar events */ - _unbindEvents=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - namespace=pluginPfx+"_"+d.idx, - sb=".mCSB_"+d.idx+"_scrollbar", - sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"), - mCSB_container=$("#mCSB_"+d.idx+"_container"); - if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));} - if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));} - if(d.bindEvents){ /* check if events are bound */ - /* unbind namespaced events from document/selectors */ - $(document).add($(!_canAccessIFrame() || top.document)).unbind("."+namespace); - sel.each(function(){ - $(this).unbind("."+namespace); - }); - /* clear and delete timeouts/objects */ - clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout"); - clearTimeout(d.sequential.step); _delete(d.sequential,"step"); - clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout"); - d.bindEvents=false; - } - }, - /* -------------------- */ - - - /* toggles scrollbar visibility */ - _scrollbarVisibility=function(disabled){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"), - content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"), - scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")], - mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")]; - if(o.axis!=="x"){ - if(d.overflowed[0] && !disabled){ - scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block"); - content.removeClass(classes[8]+" "+classes[10]); - }else{ - if(o.alwaysShowScrollbar){ - if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");} - content.removeClass(classes[10]); - }else{ - scrollbar[0].css("display","none"); - content.addClass(classes[10]); - } - content.addClass(classes[8]); - } - } - if(o.axis!=="y"){ - if(d.overflowed[1] && !disabled){ - scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block"); - content.removeClass(classes[9]+" "+classes[11]); - }else{ - if(o.alwaysShowScrollbar){ - if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");} - content.removeClass(classes[11]); - }else{ - scrollbar[1].css("display","none"); - content.addClass(classes[11]); - } - content.addClass(classes[9]); - } - } - if(!d.overflowed[0] && !d.overflowed[1]){ - $this.addClass(classes[5]); - }else{ - $this.removeClass(classes[5]); - } - }, - /* -------------------- */ - - - /* returns input coordinates of pointer, touch and mouse events (relative to document) */ - _coordinates=function(e){ - var t=e.type,o=e.target.ownerDocument!==document && frameElement!==null ? [$(frameElement).offset().top,$(frameElement).offset().left] : null, - io=_canAccessIFrame() && e.target.ownerDocument!==top.document && frameElement!==null ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0]; - switch(t){ - case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": - return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false]; - break; - case "touchstart": case "touchmove": case "touchend": - var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], - touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length; - return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1]; - break; - default: - return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false]; - } - }, - /* -------------------- */ - - - /* - SCROLLBAR DRAG EVENTS - scrolls content via scrollbar dragging - */ - _draggable=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - namespace=pluginPfx+"_"+d.idx, - draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"], - mCSB_container=$("#mCSB_"+d.idx+"_container"), - mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]), - draggable,dragY,dragX, - rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger, - eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document); - mCSB_dragger.bind("contextmenu."+namespace,function(e){ - e.preventDefault(); //prevent right click - }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ - e.stopImmediatePropagation(); - e.preventDefault(); - if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ - touchActive=true; - if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */ - _iframe.call(mCSB_container,false); /* enable scrollbar dragging over iframes by disabling their events */ - _stop($this); - draggable=$(this); - var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, - h=draggable.height()+offset.top,w=draggable.width()+offset.left; - if(y0 && x0){ - dragY=y; - dragX=x; - } - _onDragClasses(draggable,"active",o.autoExpandScrollbar); - }).bind("touchmove."+namespace,function(e){ - e.stopImmediatePropagation(); - e.preventDefault(); - var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; - _drag(dragY,dragX,y,x); - }); - $(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){ - if(draggable){ - var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; - if(dragY===y && dragX===x){return;} /* has it really moved? */ - _drag(dragY,dragX,y,x); - } - }).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ - if(draggable){ - _onDragClasses(draggable,"active",o.autoExpandScrollbar); - draggable=null; - } - touchActive=false; - if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */ - _iframe.call(mCSB_container,true); /* enable iframes events */ - }); - function _drag(dragY,dragX,y,x){ - mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0; - if(draggable.attr("id")===draggerId[1]){ - var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x; - }else{ - var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y; - } - _scrollTo($this,to.toString(),{dir:dir,drag:true}); - } - }, - /* -------------------- */ - - - /* - TOUCH SWIPE EVENTS - scrolls content via touch swipe - Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices - */ - _contentDraggable=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - namespace=pluginPfx+"_"+d.idx, - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], - draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount, - durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag, - iframe=mCSB_container.find("iframe"), - events=[ - "touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start - "touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move - "touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end - ], - touchAction=document.body.style.touchAction!==undefined && document.body.style.touchAction!==""; - mCSB_container.bind(events[0],function(e){ - _onTouchstart(e); - }).bind(events[1],function(e){ - _onTouchmove(e); - }); - mCustomScrollBox.bind(events[0],function(e){ - _onTouchstart2(e); - }).bind(events[2],function(e){ - _onTouchend(e); - }); - if(iframe.length){ - iframe.each(function(){ - $(this).bind("load",function(){ - /* bind events on accessible iframes */ - if(_canAccessIFrame(this)){ - $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ - _onTouchstart(e); - _onTouchstart2(e); - }).bind(events[1],function(e){ - _onTouchmove(e); - }).bind(events[2],function(e){ - _onTouchend(e); - }); - } - }); - }); - } - function _onTouchstart(e){ - if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} - touchable=1; touchDrag=0; docDrag=0; draggable=1; - $this.removeClass("mCS_touch_action"); - var offset=mCSB_container.offset(); - dragY=_coordinates(e)[0]-offset.top; - dragX=_coordinates(e)[1]-offset.left; - touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]; - } - function _onTouchmove(e){ - if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} - if(!o.documentTouchScroll){e.preventDefault();} - e.stopImmediatePropagation(); - if(docDrag && !touchDrag){return;} - if(draggable){ - runningTime=_getTime(); - var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, - easing="mcsLinearOut"; - touchMoveY.push(y); - touchMoveX.push(x); - touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]); - if(d.overflowed[0]){ - var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), - prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*20 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*230){return;} - speed=1000/(endTime-startTime); - var easing="mcsEaseOut",slow=speed<2.5, - diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0]; - distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX]; - var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])]; - speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed]; - var a=[ - Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])), - Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1])) - ]; - amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null]; - durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia]; - var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */ - amount[0]=absDistance[0]>md ? amount[0] : 0; - amount[1]=absDistance[1]>md ? amount[1] : 0; - if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);} - if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);} - } - function _m(ds,s){ - var r=[s*1.5,s*2,s/1.5,s/2]; - if(ds>90){ - return s>4 ? r[0] : r[3]; - }else if(ds>60){ - return s>3 ? r[3] : r[2]; - }else if(ds>30){ - return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2]; - }else{ - return s>8 ? s : r[3]; - } - } - function _drag(amount,dur,easing,dir,overwrite,drag){ - if(!amount){return;} - _scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag}); - } - }, - /* -------------------- */ - - - /* - SELECT TEXT EVENTS - scrolls content when text is selected - */ - _selectable=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, - namespace=pluginPfx+"_"+d.idx, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(), - action; - mCSB_container.bind("mousedown."+namespace,function(e){ - if(touchable){return;} - if(!action){action=1; touchActive=true;} - }).add(document).bind("mousemove."+namespace,function(e){ - if(!touchable && action && _sel()){ - var offset=mCSB_container.offset(), - y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft; - if(y>0 && y0 && xwrapper.height()){ - _seq("on",40); - } - } - if(o.axis!=="y" && d.overflowed[1]){ - if(x<0){ - _seq("on",37); - }else if(x>wrapper.width()){ - _seq("on",39); - } - } - } - } - }).bind("mouseup."+namespace+" dragend."+namespace,function(e){ - if(touchable){return;} - if(action){action=0; _seq("off",null);} - touchActive=false; - }); - function _sel(){ - return window.getSelection ? window.getSelection().toString() : - document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0; - } - function _seq(a,c,s){ - seq.type=s && action ? "stepped" : "stepless"; - seq.scrollAmount=10; - _sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null); - } - }, - /* -------------------- */ - - - /* - MOUSE WHEEL EVENT - scrolls content via mouse-wheel - via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel) - */ - _mousewheel=function(){ - if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - namespace=pluginPfx+"_"+d.idx, - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], - iframe=$("#mCSB_"+d.idx+"_container").find("iframe"); - if(iframe.length){ - iframe.each(function(){ - $(this).bind("load",function(){ - /* bind events on accessible iframes */ - if(_canAccessIFrame(this)){ - $(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){ - _onMousewheel(e,delta); - }); - } - }); - }); - } - mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){ - _onMousewheel(e,delta); - }); - function _onMousewheel(e,delta){ - _stop($this); - if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */ - var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100, - dur=o.scrollInertia; - if(o.axis==="x" || o.mouseWheel.axis==="x"){ - var dir="x", - px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)], - amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0], - contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft), - draggerPos=mCSB_dragger[1][0].offsetLeft, - limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), - dlt=o.mouseWheel.axis==="y" ? (e.deltaY || delta) : e.deltaX; - }else{ - var dir="y", - px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)], - amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0], - contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop), - draggerPos=mCSB_dragger[0][0].offsetTop, - limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), - dlt=e.deltaY || delta; - } - if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;} - if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;} - if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;} - if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){ - e.stopImmediatePropagation(); - e.preventDefault(); - } - if(e.deltaFactor<5 && !o.mouseWheel.normalizeDelta){ - //very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly - amount=e.deltaFactor; dur=17; - } - _scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur}); - } - }, - /* -------------------- */ - - - /* checks if iframe can be accessed */ - _canAccessIFrameCache=new Object(), - _canAccessIFrame=function(iframe){ - var result=false,cacheKey=false,html=null; - if(iframe===undefined){ - cacheKey="#empty"; - }else if($(iframe).attr("id")!==undefined){ - cacheKey=$(iframe).attr("id"); - } - if(cacheKey!==false && _canAccessIFrameCache[cacheKey]!==undefined){ - return _canAccessIFrameCache[cacheKey]; - } - if(!iframe){ - try{ - var doc=top.document; - html=doc.body.innerHTML; - }catch(err){/* do nothing */} - result=(html!==null); - }else{ - try{ - var doc=iframe.contentDocument || iframe.contentWindow.document; - html=doc.body.innerHTML; - }catch(err){/* do nothing */} - result=(html!==null); - } - if(cacheKey!==false){_canAccessIFrameCache[cacheKey]=result;} - return result; - }, - /* -------------------- */ - - - /* switches iframe's pointer-events property (drag, mousewheel etc. over cross-domain iframes) */ - _iframe=function(evt){ - var el=this.find("iframe"); - if(!el.length){return;} /* check if content contains iframes */ - var val=!evt ? "none" : "auto"; - el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */ - }, - /* -------------------- */ - - - /* disables mouse-wheel when hovering specific elements like select, datalist etc. */ - _disableMousewheel=function(el,target){ - var tag=target.nodeName.toLowerCase(), - tags=el.data(pluginPfx).opt.mouseWheel.disableOver, - /* elements that require focus */ - focusTags=["select","textarea"]; - return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus")); - }, - /* -------------------- */ - - - /* - DRAGGER RAIL CLICK EVENT - scrolls content via dragger rail - */ - _draggerRail=function(){ - var $this=$(this),d=$this.data(pluginPfx), - namespace=pluginPfx+"_"+d.idx, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(), - mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]), - clickable; - mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ - touchActive=true; - if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;} - }).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ - touchActive=false; - }).bind("click."+namespace,function(e){ - if(!clickable){return;} - clickable=0; - if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){ - _stop($this); - var el=$(this),mCSB_dragger=el.find(".mCSB_dragger"); - if(el.parent(".mCSB_scrollTools_horizontal").length>0){ - if(!d.overflowed[1]){return;} - var dir="x", - clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1, - to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9)); - }else{ - if(!d.overflowed[0]){return;} - var dir="y", - clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1, - to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9)); - } - _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); - } - }); - }, - /* -------------------- */ - - - /* - FOCUS EVENT - scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.) - */ - _focus=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - namespace=pluginPfx+"_"+d.idx, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(); - mCSB_container.bind("focusin."+namespace,function(e){ - var el=$(document.activeElement), - nested=mCSB_container.find(".mCustomScrollBox").length, - dur=0; - if(!el.is(o.advanced.autoScrollOnFocus)){return;} - _stop($this); - clearTimeout($this[0]._focusTimeout); - $this[0]._focusTimer=nested ? (dur+17)*nested : 0; - $this[0]._focusTimeout=setTimeout(function(){ - var to=[_childPos(el)[0],_childPos(el)[1]], - contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], - isVisible=[ - (contentPos[0]+to[0]>=0 && contentPos[0]+to[0]=0 && contentPos[0]+to[1]a"); - btn.bind("contextmenu."+namespace,function(e){ - e.preventDefault(); //prevent right click - }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){ - e.preventDefault(); - if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ - var btnClass=$(this).attr("class"); - seq.type=o.scrollButtons.scrollType; - switch(e.type){ - case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": - if(seq.type==="stepped"){return;} - touchActive=true; - d.tweenRunning=false; - _seq("on",btnClass); - break; - case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": - case "mouseout": case "pointerout": case "MSPointerOut": - if(seq.type==="stepped"){return;} - touchActive=false; - if(seq.dir){_seq("off",btnClass);} - break; - case "click": - if(seq.type!=="stepped" || d.tweenRunning){return;} - _seq("on",btnClass); - break; - } - function _seq(a,c){ - seq.scrollAmount=o.scrollButtons.scrollAmount; - _sequentialScroll($this,a,c); - } - }); - }, - /* -------------------- */ - - - /* - KEYBOARD EVENTS - scrolls content via keyboard - Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End - */ - _keyboard=function(){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, - namespace=pluginPfx+"_"+d.idx, - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(), - editables="input,textarea,select,datalist,keygen,[contenteditable='true']", - iframe=mCSB_container.find("iframe"), - events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace]; - if(iframe.length){ - iframe.each(function(){ - $(this).bind("load",function(){ - /* bind events on accessible iframes */ - if(_canAccessIFrame(this)){ - $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ - _onKeyboard(e); - }); - } - }); - }); - } - mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){ - _onKeyboard(e); - }); - function _onKeyboard(e){ - switch(e.type){ - case "blur": - if(d.tweenRunning && seq.dir){_seq("off",null);} - break; - case "keydown": case "keyup": - var code=e.keyCode ? e.keyCode : e.which,action="on"; - if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){ - /* up (38), down (40), left (37), right (39) arrows */ - if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;} - if(e.type==="keyup"){action="off";} - if(!$(document.activeElement).is(editables)){ - e.preventDefault(); - e.stopImmediatePropagation(); - _seq(action,code); - } - }else if(code===33 || code===34){ - /* PgUp (33), PgDn (34) */ - if(d.overflowed[0] || d.overflowed[1]){ - e.preventDefault(); - e.stopImmediatePropagation(); - } - if(e.type==="keyup"){ - _stop($this); - var keyboardDir=code===34 ? -1 : 1; - if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ - var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9)); - }else{ - var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9)); - } - _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); - } - }else if(code===35 || code===36){ - /* End (35), Home (36) */ - if(!$(document.activeElement).is(editables)){ - if(d.overflowed[0] || d.overflowed[1]){ - e.preventDefault(); - e.stopImmediatePropagation(); - } - if(e.type==="keyup"){ - if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ - var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0; - }else{ - var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0; - } - _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); - } - } - } - break; - } - function _seq(a,c){ - seq.type=o.keyboard.scrollType; - seq.scrollAmount=o.keyboard.scrollAmount; - if(seq.type==="stepped" && d.tweenRunning){return;} - _sequentialScroll($this,a,c); - } - } - }, - /* -------------------- */ - - - /* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */ - _sequentialScroll=function(el,action,trigger,e,s){ - var d=el.data(pluginPfx),o=d.opt,seq=d.sequential, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - once=seq.type==="stepped" ? true : false, - steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */ - steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia; - switch(action){ - case "on": - seq.dir=[ - (trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"), - (trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1) - ]; - _stop(el); - if(_isNumeric(trigger) && seq.type==="stepped"){return;} - _on(once); - break; - case "off": - _off(); - if(once || (d.tweenRunning && seq.dir)){ - _on(true); - } - break; - } - - /* starts sequence */ - function _on(once){ - if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */ - var c=seq.type!=="stepped", /* continuous scrolling */ - t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */ - m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */ - contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)], - ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x], - amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)), - px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)), - to=seq.scrollAmount!=="auto" ? px : amount, - easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut", - onComplete=!once ? false : true; - if(once && t<17){ - to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0]; - } - _scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete}); - if(once){ - seq.dir=false; - return; - } - clearTimeout(seq.step); - seq.step=setTimeout(function(){ - _on(); - },t); - } - /* stops sequence */ - function _off(){ - clearTimeout(seq.step); - _delete(seq,"step"); - _stop(el); - } - }, - /* -------------------- */ - - - /* returns a yx array from value */ - _arr=function(val){ - var o=$(this).data(pluginPfx).opt,vals=[]; - if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */ - /* check if value is object or array, its length and create an array with yx values */ - if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */ - vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val; - vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val; - }else{ /* array value (e.g. [100,100]) */ - vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null]; - } - /* check if array values are anonymous functions */ - if(typeof vals[0]==="function"){vals[0]=vals[0]();} - if(typeof vals[1]==="function"){vals[1]=vals[1]();} - return vals; - }, - /* -------------------- */ - - - /* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */ - _to=function(val,dir){ - if(val==null || typeof val=="undefined"){return;} - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(), - t=typeof val; - if(!dir){dir=o.axis==="x" ? "x" : "y";} - var contentLength=dir==="x" ? mCSB_container.outerWidth(false)-wrapper.width() : mCSB_container.outerHeight(false)-wrapper.height(), - contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop, - cssProp=dir==="x" ? "left" : "top"; - switch(t){ - case "function": /* this currently is not used. Consider removing it */ - return val(); - break; - case "object": /* js/jquery object */ - var obj=val.jquery ? val : $(val); - if(!obj.length){return;} - return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; - break; - case "string": case "number": - if(_isNumeric(val)){ /* numeric value */ - return Math.abs(val); - }else if(val.indexOf("%")!==-1){ /* percentage value */ - return Math.abs(contentLength*parseInt(val)/100); - }else if(val.indexOf("-=")!==-1){ /* decrease value */ - return Math.abs(contentPos-parseInt(val.split("-=")[1])); - }else if(val.indexOf("+=")!==-1){ /* inrease value */ - var p=(contentPos+parseInt(val.split("+=")[1])); - return p>=0 ? 0 : Math.abs(p); - }else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */ - return Math.abs(val.split("px")[0]); - }else{ - if(val==="top" || val==="left"){ /* special strings */ - return 0; - }else if(val==="bottom"){ - return Math.abs(wrapper.height()-mCSB_container.outerHeight(false)); - }else if(val==="right"){ - return Math.abs(wrapper.width()-mCSB_container.outerWidth(false)); - }else if(val==="first" || val==="last"){ - var obj=mCSB_container.find(":"+val); - return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; - }else{ - if($(val).length){ /* jquery selector */ - return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0]; - }else{ /* other values (e.g. "100em") */ - mCSB_container.css(cssProp,val); - methods.update.call(null,$this[0]); - return; - } - } - } - break; - } - }, - /* -------------------- */ - - - /* calls the update method automatically */ - _autoUpdate=function(rem){ - var $this=$(this),d=$this.data(pluginPfx),o=d.opt, - mCSB_container=$("#mCSB_"+d.idx+"_container"); - if(rem){ - /* - removes autoUpdate timer - usage: _autoUpdate.call(this,"remove"); - */ - clearTimeout(mCSB_container[0].autoUpdate); - _delete(mCSB_container[0],"autoUpdate"); - return; - } - upd(); - function upd(){ - clearTimeout(mCSB_container[0].autoUpdate); - if($this.parents("html").length===0){ - /* check element in dom tree */ - $this=null; - return; - } - mCSB_container[0].autoUpdate=setTimeout(function(){ - /* update on specific selector(s) length and size change */ - if(o.advanced.updateOnSelectorChange){ - d.poll.change.n=sizesSum(); - if(d.poll.change.n!==d.poll.change.o){ - d.poll.change.o=d.poll.change.n; - doUpd(3); - return; - } - } - /* update on main element and scrollbar size changes */ - if(o.advanced.updateOnContentResize){ - d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth; - if(d.poll.size.n!==d.poll.size.o){ - d.poll.size.o=d.poll.size.n; - doUpd(1); - return; - } - } - /* update on image load */ - if(o.advanced.updateOnImageLoad){ - if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content - d.poll.img.n=mCSB_container.find("img").length; - if(d.poll.img.n!==d.poll.img.o){ - d.poll.img.o=d.poll.img.n; - mCSB_container.find("img").each(function(){ - imgLoader(this); - }); - return; - } - } - } - if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();} - },o.advanced.autoUpdateTimeout); - } - /* a tiny image loader */ - function imgLoader(el){ - if($(el).hasClass(classes[2])){doUpd(); return;} - var img=new Image(); - function createDelegate(contextObject,delegateMethod){ - return function(){return delegateMethod.apply(contextObject,arguments);} - } - function imgOnLoad(){ - this.onload=null; - $(el).addClass(classes[2]); - doUpd(2); - } - img.onload=createDelegate(img,imgOnLoad); - img.src=el.src; - } - /* returns the total height and width sum of all elements matching the selector */ - function sizesSum(){ - if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";} - var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange); - if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});} - return total; - } - /* calls the update method */ - function doUpd(cb){ - clearTimeout(mCSB_container[0].autoUpdate); - methods.update.call(null,$this[0],cb); - } - }, - /* -------------------- */ - - - /* snaps scrolling to a multiple of a pixels number */ - _snapAmount=function(to,amount,offset){ - return (Math.round(to/amount)*amount-offset); - }, - /* -------------------- */ - - - /* stops content and scrollbar animations */ - _stop=function(el){ - var d=el.data(pluginPfx), - sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal"); - sel.each(function(){ - _stopTween.call(this); - }); - }, - /* -------------------- */ - - - /* - ANIMATES CONTENT - This is where the actual scrolling happens - */ - _scrollTo=function(el,to,options){ - var d=el.data(pluginPfx),o=d.opt, - defaults={ - trigger:"internal", - dir:"y", - scrollEasing:"mcsEaseOut", - drag:false, - dur:o.scrollInertia, - overwrite:"all", - callbacks:true, - onStart:true, - onUpdate:true, - onComplete:true - }, - options=$.extend(defaults,options), - dur=[options.dur,(options.drag ? 0 : options.dur)], - mCustomScrollBox=$("#mCSB_"+d.idx), - mCSB_container=$("#mCSB_"+d.idx+"_container"), - wrapper=mCSB_container.parent(), - totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0], - totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0]; - d.trigger=options.trigger; - if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */ - $(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible"); - wrapper.scrollTop(0).scrollLeft(0); - } - if(to==="_resetY" && !d.contentReset.y){ - /* callbacks: onOverflowYNone */ - if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);} - d.contentReset.y=1; - } - if(to==="_resetX" && !d.contentReset.x){ - /* callbacks: onOverflowXNone */ - if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);} - d.contentReset.x=1; - } - if(to==="_resetY" || to==="_resetX"){return;} - if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){ - /* callbacks: onOverflowY */ - if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);} - d.contentReset.x=null; - } - if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){ - /* callbacks: onOverflowX */ - if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);} - d.contentReset.x=null; - } - if(o.snapAmount){ /* scrolling snapping */ - var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0]; - to=_snapAmount(to,snapAmount,o.snapOffset); - } - switch(options.dir){ - case "x": - var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"), - property="left", - contentPos=mCSB_container[0].offsetLeft, - limit=[ - mCustomScrollBox.width()-mCSB_container.outerWidth(false), - mCSB_dragger.parent().width()-mCSB_dragger.width() - ], - scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)], - tso=totalScrollOffsets[1], - tsbo=totalScrollBackOffsets[1], - totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0, - totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0; - break; - case "y": - var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"), - property="top", - contentPos=mCSB_container[0].offsetTop, - limit=[ - mCustomScrollBox.height()-mCSB_container.outerHeight(false), - mCSB_dragger.parent().height()-mCSB_dragger.height() - ], - scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)], - tso=totalScrollOffsets[0], - tsbo=totalScrollBackOffsets[0], - totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0, - totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0; - break; - } - if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){ - scrollTo=[0,0]; - }else if(scrollTo[1]>=limit[1]){ - scrollTo=[limit[0],limit[1]]; - }else{ - scrollTo[0]=-scrollTo[0]; - } - if(!el[0].mcs){ - _mcs(); /* init mcs object (once) to make it available before callbacks */ - if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */ - } - clearTimeout(mCSB_container[0].onCompleteTimeout); - _tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing); - if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;} - _tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{ - onStart:function(){ - if(options.callbacks && options.onStart && !d.tweenRunning){ - /* callbacks: onScrollStart */ - if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);} - d.tweenRunning=true; - _onDragClasses(mCSB_dragger); - d.cbOffsets=_cbOffsets(); - } - },onUpdate:function(){ - if(options.callbacks && options.onUpdate){ - /* callbacks: whileScrolling */ - if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);} - } - },onComplete:function(){ - if(options.callbacks && options.onComplete){ - if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);} - var t=mCSB_container[0].idleTimer || 0; - mCSB_container[0].onCompleteTimeout=setTimeout(function(){ - /* callbacks: onScroll, onTotalScroll, onTotalScrollBack */ - if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);} - if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);} - if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);} - d.tweenRunning=false; - mCSB_container[0].idleTimer=0; - _onDragClasses(mCSB_dragger,"hide"); - },t); - } - } - }); - /* checks if callback function exists */ - function _cb(cb){ - return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function"; - } - /* checks whether callback offsets always trigger */ - function _cbOffsets(){ - return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo]; - } - /* - populates object with useful values for the user - values: - content: this.mcs.content - content top position: this.mcs.top - content left position: this.mcs.left - dragger top position: this.mcs.draggerTop - dragger left position: this.mcs.draggerLeft - scrolling y percentage: this.mcs.topPct - scrolling x percentage: this.mcs.leftPct - scrolling direction: this.mcs.direction - */ - function _mcs(){ - var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */ - dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */ - cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */ - pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */ - el[0].mcs={ - content:mCSB_container, /* original content wrapper as jquery object */ - top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1], - topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])), - direction:options.dir - }; - /* - this refers to the original element containing the scrollbar(s) - usage: this.mcs.top, this.mcs.leftPct etc. - */ - } - }, - /* -------------------- */ - - - /* - CUSTOM JAVASCRIPT ANIMATION TWEEN - Lighter and faster than jquery animate() and css transitions - Animates top/left properties and includes easings - */ - _tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){ - if(!el._mTween){el._mTween={top:{},left:{}};} - var callbacks=callbacks || {}, - onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){}, - startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop]; - if(prop==="left"){from=el.offsetLeft;} - var diff=to-from; - tobj.stop=0; - if(overwrite!=="none"){_cancelTween();} - _startTween(); - function _step(){ - if(tobj.stop){return;} - if(!progress){onStart.call();} - progress=_getTime()-startTime; - _tween(); - if(progress>=tobj.time){ - tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1; - if(tobj.time0){ - tobj.currVal=_ease(tobj.time,from,diff,duration,easing); - elStyle[prop]=Math.round(tobj.currVal)+"px"; - }else{ - elStyle[prop]=to+"px"; - } - onUpdate.call(); - } - function _startTween(){ - _delay=1000/60; - tobj.time=progress+_delay; - _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame; - tobj.id=_request(_step); - } - function _cancelTween(){ - if(tobj.id==null){return;} - if(!window.requestAnimationFrame){clearTimeout(tobj.id); - }else{window.cancelAnimationFrame(tobj.id);} - tobj.id=null; - } - function _ease(t,b,c,d,type){ - switch(type){ - case "linear": case "mcsLinear": - return c*t/d + b; - break; - case "mcsLinearOut": - t/=d; t--; return c * Math.sqrt(1 - t*t) + b; - break; - case "easeInOutSmooth": - t/=d/2; - if(t<1) return c/2*t*t + b; - t--; - return -c/2 * (t*(t-2) - 1) + b; - break; - case "easeInOutStrong": - t/=d/2; - if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b; - t--; - return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b; - break; - case "easeInOut": case "mcsEaseInOut": - t/=d/2; - if(t<1) return c/2*t*t*t + b; - t-=2; - return c/2*(t*t*t + 2) + b; - break; - case "easeOutSmooth": - t/=d; t--; - return -c * (t*t*t*t - 1) + b; - break; - case "easeOutStrong": - return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b; - break; - case "easeOut": case "mcsEaseOut": default: - var ts=(t/=d)*t,tc=ts*t; - return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t); - } - } - }, - /* -------------------- */ - - - /* returns current time */ - _getTime=function(){ - if(window.performance && window.performance.now){ - return window.performance.now(); - }else{ - if(window.performance && window.performance.webkitNow){ - return window.performance.webkitNow(); - }else{ - if(Date.now){return Date.now();}else{return new Date().getTime();} - } - } - }, - /* -------------------- */ - - - /* stops a tween */ - _stopTween=function(){ - var el=this; - if(!el._mTween){el._mTween={top:{},left:{}};} - var props=["top","left"]; - for(var i=0; i