From 6123ee966d23f625502d0616882f34977f0c66e2 Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Tue, 23 Mar 2021 13:06:35 +0500 Subject: [PATCH 1/7] Add test objects generator stub --- .github/workflows/generator.yml | 74 ++ .gitignore | 3 + Tests/GenConfig.fdg | 75 ++ ...tform.Flexberry.ORM.ODataService.Tests.crp | 1082 +++++++++++++++++ 4 files changed, 1234 insertions(+) create mode 100644 .github/workflows/generator.yml create mode 100644 Tests/GenConfig.fdg create mode 100644 Tests/NewPlatform.Flexberry.ORM.ODataService.Tests.crp diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml new file mode 100644 index 00000000..283222a3 --- /dev/null +++ b/.github/workflows/generator.yml @@ -0,0 +1,74 @@ + +name: TestsCodeGen + +# Controls when the action will run. +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "Generate" + Generate: + # The type of runner that the job will run on + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + + - name: Install NewPlatform.Flexberry.Designer.CommandLine + run: nuget install NewPlatform.Flexberry.Designer.CommandLine -Version 0.1.0-alpha19 -OutputDirectory gen + + - name: Starting X virtual framebuffer (Xvfb) in background + run: Xvfb -ac :99 -screen 0 1280x1024x16 & + + - name: Code generation + env: + FLEXBERRY_TOKEN: ${{ secrets.FLEXBERRY_TOKEN }} + run: | + export DISPLAY=:99 + export SSH_ASKPASS=1 + export FLEXBERRY_TOKEN + mono ./gen/NewPlatform.Flexberry.Designer.CommandLine.0.1.0-alpha19/tools/flexberry.exe ./GenConfig.fdg "${FLEXBERRY_TOKEN}" + - name: Tune ssh-keys + env: + PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + run: | + set -x + export PRIVATE_KEY + # Setup SSH agent + export SSH_AUTH_SOCK=/tmp/ssh_agent.sock + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + # Start ssh agent + ssh-agent -a $SSH_AUTH_SOCK #> /dev/null + ssh-add - <<< "${PRIVATE_KEY}" + - name: Git commit + run: | + set -x + git config user.name "Flexberry-man" + git config user.email "mail@flexberry.net" + git add --all + git commit -m "Flexberry code generation" + # TODO: решить проблему с новыми добавленными файлами, которые не показываются в git diff, пример решения: https://stackoverflow.com/questions/855767/can-i-use-git-diff-on-untracked-files + # STATUS=$(git diff) + # if [ "$STATUS" != "" ] + # then + # git add --all + # git commit -m "Flexberry code generation" + # fi + - name: Git push + run: | + set -x + SSH_AUTH_SOCK=/tmp/ssh_agent.sock + export SSH_AUTH_SOCK; + # Redirect any output to /dev/null to hide any sensitive credential data that might otherwise be exposed. + git push --force --quiet "git@github.com:${GITHUB_REPOSITORY}.git" > /dev/null 2>&1 + echo "Done." + - name: Cleanup + if: always() + run: | + rm -Rf .ssh .github * \ No newline at end of file diff --git a/.gitignore b/.gitignore index c4984d85..dfcdd71d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ */*/FakesAssemblies/ **/*.vspscc *.user + +# Code generator +gen/ diff --git a/Tests/GenConfig.fdg b/Tests/GenConfig.fdg new file mode 100644 index 00000000..d880df57 --- /dev/null +++ b/Tests/GenConfig.fdg @@ -0,0 +1,75 @@ +{ + "ProjectId": "", + "CrpLocalPath": "../../../Tests/NewPlatform.Flexberry.ORM.ODataService.Tests.crp", + "JsonMetadataPath": null, + "OnlineCrpUrl": "", + "OneShotToken": null, + "GenPath": "../../../src", + "GenerationItems": { + "Validate": false, + "Frontend": { + "EmberJs": { + "EmberApp": false, + "EmberAddon": false, + "Build": false, + "GitClone": false, + "GitPush": false, + "GhPagesPush": true + }, + "ApacheCordova": { + "CordovaProject": false, + "BuildApp": false + } + }, + "Backend": { + "AspNet": true, + "AspNetCore": false, + "Java": false + }, + "Docker": { + "Dockerfile": false, + "DockerfileAutobuild": false, + "DockerBuildShellScript": false, + "DockerSwarm": false + }, + "Storage": { + "Mssql": { + "DiffSql": false, + "FullSql": true, + "Security": false, + "AdminUser": false, + "ConnectionString": null + }, + "PostgreSql": { + "DiffSql": false, + "FullSql": true, + "Security": false, + "AdminUser": false, + "ConnectionString": null + }, + "ClickHouse": { + "DiffSql": false, + "FullSql": false, + "ConnectionString": null + }, + "Oracle": { + "DiffSql": false, + "FullSql": true, + "ConnectionString": null + }, + "Access": { + "DiffSql": false, + "FullSql": false, + "ConnectionString": null + } + }, + "Docs": { + "Csv": false, + "Wmf": false + }, + "Metadata": { + "Crp": false, + "Json": false + } + } +} diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests.crp b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests.crp new file mode 100644 index 00000000..ecd160ae --- /dev/null +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests.crp @@ -0,0 +1,1082 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 8baf6acbc91acf453587ccbf1144b94b9df0ca7d Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Mon, 29 Mar 2021 17:59:38 +0500 Subject: [PATCH 2/7] Add hierarchical details test objects --- .gitignore | 2 +- Tests/BusinessServers/BearBS.cs | 116 + Tests/BusinessServers/CarBS.cs | 5 +- Tests/BusinessServers/CatsBS.cs | 2 - Tests/BusinessServers/DenBS.cs | 62 + Tests/BusinessServers/ForestBS.cs | 49 + ....ODataService.Tests.BusinessServers.csproj | 3 + .../SqlScripts/MssqlScript.sql | 1002 ++++---- ...tform.Flexberry.ORM.ODataService.Tests.crp | 230 +- .../SqlScripts/OracleScript.sql | 1046 ++++---- .../SqlScripts/PostgresScript.sql | 2153 +++++++++-------- Tests/Objects/BaseLegoBlock.cs | 179 ++ Tests/Objects/LegoBlock.cs | 320 +++ Tests/Objects/LegoBlockBottomPanel.cs | 185 ++ Tests/Objects/LegoBlockColor.cs | 107 + Tests/Objects/LegoBlockCustomPanel.cs | 222 ++ Tests/Objects/LegoBlockTopPanel.cs | 257 ++ Tests/Objects/LegoBlockTopPanelHole.cs | 153 ++ Tests/Objects/LegoDevice.cs | 108 + Tests/Objects/LegoMaterial.cs | 74 + Tests/Objects/LegoPanelAngle.cs | 107 + Tests/Objects/LegoPatent.cs | 256 ++ Tests/Objects/LegoSocketStandard.cs | 74 + ...erry.ORM.ODataService.Tests.Objects.csproj | 12 + ...21\200\320\273\320\276\320\263\320\260.cs" | 4 +- "Tests/Objects/\320\233\320\265\321\201.cs" | 4 +- ...20\264\320\262\320\265\320\264\321\214.cs" | 4 +- 27 files changed, 4903 insertions(+), 1833 deletions(-) create mode 100644 Tests/BusinessServers/BearBS.cs create mode 100644 Tests/BusinessServers/DenBS.cs create mode 100644 Tests/BusinessServers/ForestBS.cs create mode 100644 Tests/Objects/BaseLegoBlock.cs create mode 100644 Tests/Objects/LegoBlock.cs create mode 100644 Tests/Objects/LegoBlockBottomPanel.cs create mode 100644 Tests/Objects/LegoBlockColor.cs create mode 100644 Tests/Objects/LegoBlockCustomPanel.cs create mode 100644 Tests/Objects/LegoBlockTopPanel.cs create mode 100644 Tests/Objects/LegoBlockTopPanelHole.cs create mode 100644 Tests/Objects/LegoDevice.cs create mode 100644 Tests/Objects/LegoMaterial.cs create mode 100644 Tests/Objects/LegoPanelAngle.cs create mode 100644 Tests/Objects/LegoPatent.cs create mode 100644 Tests/Objects/LegoSocketStandard.cs diff --git a/.gitignore b/.gitignore index dfcdd71d..3f46a540 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ /packages/ **/bin/ */obj/ -*/*/obj/ +**/obj/ .vs */*/FakesAssemblies/ **/*.vspscc diff --git a/Tests/BusinessServers/BearBS.cs b/Tests/BusinessServers/BearBS.cs new file mode 100644 index 00000000..0fadab61 --- /dev/null +++ b/Tests/BusinessServers/BearBS.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + + + // *** Start programmer edit section *** (Using statements) + using System.Collections.Generic; + using System.Linq; + using ICSSoft.STORMNET; + + // *** End programmer edit section *** (Using statements) + + + /// + /// BearBS. + /// + // *** Start programmer edit section *** (BearBS CustomAttributes) + + // *** End programmer edit section *** (BearBS CustomAttributes) + [ICSSoft.STORMNET.AccessType(ICSSoft.STORMNET.AccessType.none)] + public class BearBS : ICSSoft.STORMNET.Business.BusinessServer + { + + // *** Start programmer edit section *** (BearBS CustomMembers) + + // *** End programmer edit section *** (BearBS CustomMembers) + + + // *** Start programmer edit section *** (OnUpdateМедведь CustomAttributes) + + // *** End programmer edit section *** (OnUpdateМедведь CustomAttributes) + public virtual ICSSoft.STORMNET.DataObject[] OnUpdateМедведь(NewPlatform.Flexberry.ORM.ODataService.Tests.Медведь UpdatedObject) + { + // *** Start programmer edit section *** (OnUpdateМедведь) + + var updatedObjects = new List(); + if (UpdatedObject.GetStatus() == ObjectStatus.Created) + { + UpdatedObject.ПолеБС = "Object created."; + + string testMethodName = "ChangeMasterTest"; + if (UpdatedObject.ЦветГлаз == testMethodName) + { + UpdatedObject.ЛесОбитания.Название = testMethodName; + updatedObjects.Add(UpdatedObject.ЛесОбитания); + } + } + else if (UpdatedObject.GetStatus() == ObjectStatus.Altered) + { + if (UpdatedObject.IsAlteredProperty(x => x.ЛесОбитания) && UpdatedObject.ЛесОбитания != null) + { + UpdatedObject.ПолеБС = $"Медведь обитает в {UpdatedObject.ЛесОбитания.Название}"; + } + + IEnumerable<Берлога> берлоги = UpdatedObject.Берлога.GetAllObjects().Cast<Берлога>(); + + var новаяБерлога = берлоги.FirstOrDefault(б => б.GetStatus() == ObjectStatus.Created); + if (новаяБерлога != null) + { + foreach (Берлога берлога in UpdatedObject.Берлога) + { + if (берлога != новаяБерлога) + { + берлога.Заброшена = true; + updatedObjects.Add(берлога); + } + } + } + + var последняяБерлога = берлоги.FirstOrDefault(б => б.GetStatus() == ObjectStatus.Altered); + if (последняяБерлога != null) + { + foreach (Берлога берлога in UpdatedObject.Берлога) + { + if (берлога != последняяБерлога) + { + берлога.Заброшена = true; + updatedObjects.Add(берлога); + } + } + + UpdatedObject.ЦветГлаз = последняяБерлога.Наименование; + последняяБерлога.Заброшена = false; + updatedObjects.Add(последняяБерлога); + } + + var разрушеннаяБерлога = берлоги.FirstOrDefault(б => б.GetStatus() == ObjectStatus.Deleted); + if (разрушеннаяБерлога != null) + { + foreach (Берлога берлога in UpdatedObject.Берлога) + { + if (берлога != разрушеннаяБерлога) + { + берлога.Комфортность += 1; + updatedObjects.Add(берлога); + } + } + } + } + + return updatedObjects.Distinct().ToArray(); + // *** End programmer edit section *** (OnUpdateМедведь) + } + } +} diff --git a/Tests/BusinessServers/CarBS.cs b/Tests/BusinessServers/CarBS.cs index 50807f4e..26c5f1fd 100644 --- a/Tests/BusinessServers/CarBS.cs +++ b/Tests/BusinessServers/CarBS.cs @@ -7,12 +7,13 @@ // повторной генерации кода. // //------------------------------------------------------------------------------ + namespace NewPlatform.Flexberry.ORM.ODataService.Tests { using System; using System.Xml; - - + + // *** Start programmer edit section *** (Using statements) using System.Collections.Generic; using ICSSoft.STORMNET; diff --git a/Tests/BusinessServers/CatsBS.cs b/Tests/BusinessServers/CatsBS.cs index 509e6d08..3a9a50c4 100644 --- a/Tests/BusinessServers/CatsBS.cs +++ b/Tests/BusinessServers/CatsBS.cs @@ -40,7 +40,6 @@ public class CatsBS : ICSSoft.STORMNET.Business.BusinessServer public virtual ICSSoft.STORMNET.DataObject[] OnUpdateПерелом(NewPlatform.Flexberry.ORM.ODataService.Tests.Перелом UpdatedObject) { // *** Start programmer edit section *** (OnUpdateПерелом) - return new ICSSoft.STORMNET.DataObject[0]; // *** End programmer edit section *** (OnUpdateПерелом) } @@ -67,7 +66,6 @@ public virtual ICSSoft.STORMNET.DataObject[] OnUpdateЛапа(NewPlatform.Flexbe public virtual ICSSoft.STORMNET.DataObject[] OnUpdateКошка(NewPlatform.Flexberry.ORM.ODataService.Tests.Кошка UpdatedObject) { // *** Start programmer edit section *** (OnUpdateКошка) - return new ICSSoft.STORMNET.DataObject[0]; // *** End programmer edit section *** (OnUpdateКошка) } diff --git a/Tests/BusinessServers/DenBS.cs b/Tests/BusinessServers/DenBS.cs new file mode 100644 index 00000000..9b0295c4 --- /dev/null +++ b/Tests/BusinessServers/DenBS.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + + + // *** Start programmer edit section *** (Using statements) + using ICSSoft.STORMNET; + + // *** End programmer edit section *** (Using statements) + + + /// + /// DenBS. + /// + // *** Start programmer edit section *** (DenBS CustomAttributes) + + // *** End programmer edit section *** (DenBS CustomAttributes) + [ICSSoft.STORMNET.AccessType(ICSSoft.STORMNET.AccessType.none)] + public class DenBS : ICSSoft.STORMNET.Business.BusinessServer + { + + // *** Start programmer edit section *** (DenBS CustomMembers) + + // *** End programmer edit section *** (DenBS CustomMembers) + + + // *** Start programmer edit section *** (OnUpdateБерлога CustomAttributes) + + // *** End programmer edit section *** (OnUpdateБерлога CustomAttributes) + public virtual ICSSoft.STORMNET.DataObject[] OnUpdateБерлога(NewPlatform.Flexberry.ORM.ODataService.Tests.Берлога UpdatedObject) + { + // *** Start programmer edit section *** (OnUpdateБерлога) + + if (UpdatedObject.GetStatus() == ObjectStatus.Created) + { + UpdatedObject.ПолеБС = "Object created."; + } + else if (UpdatedObject.GetStatus() == ObjectStatus.Altered) + { + if (UpdatedObject.IsAlteredProperty(x => x.ЛесРасположения) && UpdatedObject.ЛесРасположения != null) + { + UpdatedObject.ПолеБС = $"Берлога расположена в {UpdatedObject.ЛесРасположения.Название}"; + } + } + + return new DataObject[0]; + + // *** End programmer edit section *** (OnUpdateБерлога) + } + } +} diff --git a/Tests/BusinessServers/ForestBS.cs b/Tests/BusinessServers/ForestBS.cs new file mode 100644 index 00000000..c0dd90dd --- /dev/null +++ b/Tests/BusinessServers/ForestBS.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// ForestBS. + /// + // *** Start programmer edit section *** (ForestBS CustomAttributes) + + // *** End programmer edit section *** (ForestBS CustomAttributes) + [ICSSoft.STORMNET.AccessType(ICSSoft.STORMNET.AccessType.none)] + public class ForestBS : ICSSoft.STORMNET.Business.BusinessServer + { + + // *** Start programmer edit section *** (ForestBS CustomMembers) + + // *** End programmer edit section *** (ForestBS CustomMembers) + + + // *** Start programmer edit section *** (OnUpdateЛес CustomAttributes) + + // *** End programmer edit section *** (OnUpdateЛес CustomAttributes) + public virtual ICSSoft.STORMNET.DataObject[] OnUpdateЛес(NewPlatform.Flexberry.ORM.ODataService.Tests.Лес UpdatedObject) + { + // *** Start programmer edit section *** (OnUpdateЛес) + + return new ICSSoft.STORMNET.DataObject[] { UpdatedObject }; + + // *** End programmer edit section *** (OnUpdateЛес) + } + } +} diff --git a/Tests/BusinessServers/NewPlatform.Flexberry.ORM.ODataService.Tests.BusinessServers.csproj b/Tests/BusinessServers/NewPlatform.Flexberry.ORM.ODataService.Tests.BusinessServers.csproj index 6a686193..74995daa 100644 --- a/Tests/BusinessServers/NewPlatform.Flexberry.ORM.ODataService.Tests.BusinessServers.csproj +++ b/Tests/BusinessServers/NewPlatform.Flexberry.ORM.ODataService.Tests.BusinessServers.csproj @@ -141,8 +141,11 @@ + + + Code diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/MssqlScript.sql b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/MssqlScript.sql index 81159b81..cd23eef0 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/MssqlScript.sql +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/MssqlScript.sql @@ -1,869 +1,1022 @@ - - + + + +CREATE TABLE [LegoPanelAngle] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Name] VARCHAR(255) NULL, + + [Angle] INT NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Driver] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Name] VARCHAR(255) NULL, - + [CarCount] INT NULL, - + [Documents] BIT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Страна] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Master] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [property] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Лес] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [Площадь] INT NULL, - + [Заповедник] BIT NULL, - + [ДатаПослОсмотра] DATETIME NULL, - + [Страна] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Son] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [SuspendersColor] VARCHAR(255) NULL, - + [Name] VARCHAR(255) NULL, - + [Parent] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [ТипПороды] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [ДатаРегистрации] DATETIME NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Порода] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [ТипПороды_m0] UNIQUEIDENTIFIER NULL, - + [Иерархия_m0] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [TestDetailWithCicle] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [TestDetailName] VARCHAR(255) NULL, - + [Parent] UNIQUEIDENTIFIER NULL, - + [TestMaster] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoBlockCustomPanel] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Orientation] VARCHAR(255) NULL, + + [Position] VARCHAR(255) NULL, + + [PanelAngle] UNIQUEIDENTIFIER NULL, + + [Block] UNIQUEIDENTIFIER NOT NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Daughter] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [DressColor] VARCHAR(255) NULL, - + [Name] VARCHAR(255) NULL, - + [Parent] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [КлассСМножТипов] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [PropertyGeography] geography NULL, - - [PropertyEnum] VARCHAR(6) NULL, - + + [PropertyEnum] VARCHAR(0) NULL, + [PropertyBool] BIT NULL, - + [PropertyInt] INT NULL, - + [PropertyDateTime] DATETIME NULL, - + [PropertyString] VARCHAR(255) NULL, - + [PropertyFloat] REAL NULL, - + [PropertyDouble] FLOAT NULL, - + [PropertyDecimal] DECIMAL NULL, - + [PropertySystemNullableDateTime] DATETIME NULL, - + [PropertySystemNullableInt] INT NULL, - + [PropertySystemNullableGuid] UNIQUEIDENTIFIER NULL, - + [PropertySystemNullableDecimal] DECIMAL NULL, - + [PropStormnetNullableDateTime] DATETIME NULL, - + [PropertyStormnetNullableInt] INT NULL, - + [PropertyStormnetKeyGuid] UNIQUEIDENTIFIER NULL, - + [PropStormnetNullableDecimal] DECIMAL NULL, - + [PropertyStormnetPartliedDate] VARCHAR(255) NULL, - + [PropertyStormnetContact] NVARCHAR(MAX) NULL, - + [PropertyStormnetBlob] NVARCHAR(MAX) NULL, - + [PropertyStormnetEvent] NVARCHAR(MAX) NULL, - + [PropertyStormnetGeoData] NVARCHAR(MAX) NULL, - + [PropertyStormnetImage] NVARCHAR(MAX) NULL, - + [PropertyStormnetWebFile] NVARCHAR(MAX) NULL, - + [PropertyStormnetFile] NVARCHAR(MAX) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Медведь] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [ПолеБС] VARCHAR(255) NULL, - + [ПорядковыйНомер] INT NULL, - + [Вес] INT NULL, - + [ЦветГлаз] VARCHAR(255) NULL, - + [Пол] VARCHAR(9) NULL, - + [ДатаРождения] DATETIME NULL, - + [CreateTime] DATETIME NULL, - + [Creator] VARCHAR(255) NULL, - + [EditTime] DATETIME NULL, - + [Editor] VARCHAR(255) NULL, - + [Страна] UNIQUEIDENTIFIER NULL, - + [ЛесОбитания] UNIQUEIDENTIFIER NULL, - + [Мама] UNIQUEIDENTIFIER NULL, - + [Папа] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoBlockColor] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Name] VARCHAR(255) NULL, + + [ColorNumber] INT NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Детейл] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [prop1] INT NULL, - + [БазовыйКласс_m0] UNIQUEIDENTIFIER NULL, - + [БазовыйКласс_m1] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [ДочернийКласс] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [ChildProperty] VARCHAR(255) NULL, - + [PropertyGeography] geography NULL, - - [PropertyEnum] VARCHAR(6) NULL, - + + [PropertyEnum] VARCHAR(0) NULL, + [PropertyBool] BIT NULL, - + [PropertyInt] INT NULL, - + [PropertyDateTime] DATETIME NULL, - + [PropertyString] VARCHAR(255) NULL, - + [PropertyFloat] REAL NULL, - + [PropertyDouble] FLOAT NULL, - + [PropertyDecimal] DECIMAL NULL, - + [PropertySystemNullableDateTime] DATETIME NULL, - + [PropertySystemNullableInt] INT NULL, - + [PropertySystemNullableGuid] UNIQUEIDENTIFIER NULL, - + [PropertySystemNullableDecimal] DECIMAL NULL, - + [PropStormnetNullableDateTime] DATETIME NULL, - + [PropertyStormnetNullableInt] INT NULL, - + [PropertyStormnetKeyGuid] UNIQUEIDENTIFIER NULL, - + [PropStormnetNullableDecimal] DECIMAL NULL, - + [PropertyStormnetPartliedDate] VARCHAR(255) NULL, - + [PropertyStormnetContact] NVARCHAR(MAX) NULL, - + [PropertyStormnetBlob] NVARCHAR(MAX) NULL, - + [PropertyStormnetEvent] NVARCHAR(MAX) NULL, - + [PropertyStormnetGeoData] NVARCHAR(MAX) NULL, - + [PropertyStormnetImage] NVARCHAR(MAX) NULL, - + [PropertyStormnetWebFile] NVARCHAR(MAX) NULL, - + [PropertyStormnetFile] NVARCHAR(MAX) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Книга] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [Автор1] UNIQUEIDENTIFIER NOT NULL, - + [Библиотека1] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoBlock] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Width] INT NULL, + + [Height] INT NULL, + + [Top] INT NULL, + + [Configuration] VARCHAR(255) NULL, + + [Name] VARCHAR(255) NULL, + + [BlockId] INT NULL, + + [Material] UNIQUEIDENTIFIER NULL, + + [Color] UNIQUEIDENTIFIER NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Person] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Name] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoSocketStandard] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Name] VARCHAR(255) NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Перелом] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Дата] DATETIME NULL, - - [Тип] VARCHAR(8) NULL, - + + [Тип] VARCHAR(0) NULL, + [Лапа_m0] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [БазовыйКласс] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Свойство1] VARCHAR(255) NULL, - + [Свойство2] INT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [ПоставщикКниг] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Ссылка] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Мастер2] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [свойство2] INT NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoDevice] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Description] VARCHAR(255) NULL, + + [Electricity] BIT NULL, + + [Name] VARCHAR(255) NULL, + + [BlockId] INT NULL, + + [Color] UNIQUEIDENTIFIER NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Наследник] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Свойство] FLOAT NULL, - + [Свойство1] VARCHAR(255) NULL, - + [Свойство2] INT NULL, - + [Мастер] UNIQUEIDENTIFIER NULL, - + [Master] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Car] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Number] VARCHAR(255) NULL, - + [Model] VARCHAR(255) NULL, - - [TipCar] VARCHAR(9) NULL, - + + [TipCar] VARCHAR(0) NULL, + [driver] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Мастер] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [prop] VARCHAR(255) NULL, - + [Мастер2] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Блоха] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Кличка] VARCHAR(255) NULL, - + [МедведьОбитания] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoPatent] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Name] VARCHAR(255) NULL, + + [Date] DATETIME NULL, + + [Authors] VARCHAR(255) NULL, + + [Description] VARCHAR(255) NULL, + + [/BaseLegoBlock_m0] UNIQUEIDENTIFIER NULL, + + [/BaseLegoBlock_m1] UNIQUEIDENTIFIER NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [Лапа] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Цвет] VARCHAR(255) NULL, - + [Размер] INT NULL, - + [ДатаРождения] DATETIME NULL, - + [БылиЛиПереломы] BIT NULL, - - [Сторона] VARCHAR(11) NULL, - + + [Сторона] VARCHAR(0) NULL, + [Номер] INT NULL, - + [РазмерDouble] FLOAT NULL, - + [РазмерFloat] REAL NULL, - + [РазмерDecimal] DECIMAL NULL, - + [ТипЛапы_m0] UNIQUEIDENTIFIER NULL, - + [Кошка_m0] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [КлассСоСтрокКл] ( - + [StoragePrimaryKey] VARCHAR(255) NOT NULL, - + PRIMARY KEY ([StoragePrimaryKey])) - + CREATE TABLE [Берлога] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [ПолеБС] VARCHAR(255) NULL, - + [Наименование] VARCHAR(255) NULL, - + [Комфортность] INT NULL, - + [Заброшена] BIT NULL, - + [Сертификат] NVARCHAR(MAX) NULL, - + [CertString] NVARCHAR(MAX) NULL, - + [ЛесРасположения] UNIQUEIDENTIFIER NULL, - + [Медведь] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Автор] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Имя] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [TestMaster] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [TestMasterName] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Котенок] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [КличкаКотенка] VARCHAR(255) NULL, - + [Глупость] INT NULL, - + [Кошка_m0] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Библиотека] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Адрес] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoMaterial] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Name] VARCHAR(255) NULL, + + PRIMARY KEY ([primaryKey])) + -CREATE TABLE [Детейл2] ( +CREATE TABLE [LegoBlockBottomPanel] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [WidthCount] INT NULL, + + [HeightCount] INT NULL, + + [Block] UNIQUEIDENTIFIER NOT NULL, + + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoBlockTopPanelHole] ( + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [Position] VARCHAR(255) NULL, + + [TopPanel] UNIQUEIDENTIFIER NOT NULL, + + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [Детейл2] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + [prop2] VARCHAR(255) NULL, - + [Детейл_m0] UNIQUEIDENTIFIER NULL, - + [Детейл_m1] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Журнал] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [Номер] INT NULL, - + [Автор2] UNIQUEIDENTIFIER NOT NULL, - + [Библиотека2] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) + +CREATE TABLE [LegoBlockTopPanel] ( + + [primaryKey] UNIQUEIDENTIFIER NOT NULL, + + [WidthCount] INT NULL, + + [HeightCount] INT NULL, + + [SocketStandard] UNIQUEIDENTIFIER NULL, + + [Block] UNIQUEIDENTIFIER NOT NULL, + + PRIMARY KEY ([primaryKey])) + CREATE TABLE [ТипЛапы] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Название] VARCHAR(255) NULL, - + [Актуально] BIT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [КлассStoredDerived] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [StrAttr2] VARCHAR(255) NULL, - + [StrAttr] VARCHAR(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [Кошка] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [Кличка] VARCHAR(255) NULL, - + [ДатаРождения] DATETIME NULL, - - [Тип] VARCHAR(11) NULL, - + + [Тип] VARCHAR(0) NULL, + [ПородаСтрокой] VARCHAR(255) NULL, - + [Агрессивная] BIT NULL, - + [УсыСлева] INT NULL, - + [УсыСправа] INT NULL, - + [Порода_m0] UNIQUEIDENTIFIER NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [ДетейлНаследник] ( - + [primaryKey] UNIQUEIDENTIFIER NOT NULL, - + [prop3] VARCHAR(255) NULL, - + [prop1] INT NULL, - + [БазовыйКласс_m0] UNIQUEIDENTIFIER NULL, - + [БазовыйКласс_m1] UNIQUEIDENTIFIER NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMNETLOCKDATA] ( - + [LockKey] VARCHAR(300) NOT NULL, - + [UserName] VARCHAR(300) NOT NULL, - + [LockDate] DATETIME NULL, - + PRIMARY KEY ([LockKey])) - + CREATE TABLE [STORMSETTINGS] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Module] varchar(1000) NULL, - + [Name] varchar(255) NULL, - + [Value] text NULL, - + [User] varchar(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMAdvLimit] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [User] varchar(255) NULL, - + [Published] bit NULL, - + [Module] varchar(255) NULL, - + [Name] varchar(255) NULL, - + [Value] text NULL, - + [HotKeyData] int NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMFILTERSETTING] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Name] varchar(255) NOT NULL, - + [DataObjectView] varchar(255) NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMWEBSEARCH] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Name] varchar(255) NOT NULL, - + [Order] INT NOT NULL, - + [PresentView] varchar(255) NOT NULL, - + [DetailedView] varchar(255) NOT NULL, - + [FilterSetting_m0] uniqueidentifier NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMFILTERDETAIL] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Caption] varchar(255) NOT NULL, - + [DataObjectView] varchar(255) NOT NULL, - + [ConnectMasterProp] varchar(255) NOT NULL, - + [OwnerConnectProp] varchar(255) NULL, - + [FilterSetting_m0] uniqueidentifier NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMFILTERLOOKUP] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [DataObjectType] varchar(255) NOT NULL, - + [Container] varchar(255) NULL, - + [ContainerTag] varchar(255) NULL, - + [FieldsToView] varchar(255) NULL, - + [FilterSetting_m0] uniqueidentifier NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [UserSetting] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [AppName] varchar(256) NULL, - + [UserName] varchar(512) NULL, - + [UserGuid] uniqueidentifier NULL, - + [ModuleName] varchar(1024) NULL, - + [ModuleGuid] uniqueidentifier NULL, - + [SettName] varchar(256) NULL, - + [SettGuid] uniqueidentifier NULL, - + [SettLastAccessTime] DATETIME NULL, - + [StrVal] varchar(256) NULL, - + [TxtVal] varchar(max) NULL, - + [IntVal] int NULL, - + [BoolVal] bit NULL, - + [GuidVal] uniqueidentifier NULL, - + [DecimalVal] decimal(20,10) NULL, - + [DateTimeVal] DATETIME NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [ApplicationLog] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Category] varchar(64) NULL, - + [EventId] INT NULL, - + [Priority] INT NULL, - + [Severity] varchar(32) NULL, - + [Title] varchar(256) NULL, - + [Timestamp] DATETIME NULL, - + [MachineName] varchar(32) NULL, - + [AppDomainName] varchar(512) NULL, - + [ProcessId] varchar(256) NULL, - + [ProcessName] varchar(512) NULL, - + [ThreadName] varchar(512) NULL, - + [Win32ThreadId] varchar(128) NULL, - + [Message] varchar(2500) NULL, - + [FormattedMessage] varchar(max) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMAG] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Name] varchar(80) NOT NULL, - + [Login] varchar(50) NULL, - + [Pwd] varchar(50) NULL, - + [IsUser] bit NOT NULL, - + [IsGroup] bit NOT NULL, - + [IsRole] bit NOT NULL, - + [ConnString] varchar(255) NULL, - + [Enabled] bit NULL, - + [Email] varchar(80) NULL, - + [Comment] varchar(MAX) NULL, - + [CreateTime] datetime NULL, - + [Creator] varchar(255) NULL, - + [EditTime] datetime NULL, - + [Editor] varchar(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMLG] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Group_m0] uniqueidentifier NOT NULL, - + [User_m0] uniqueidentifier NOT NULL, - + [CreateTime] datetime NULL, - + [Creator] varchar(255) NULL, - + [EditTime] datetime NULL, - + [Editor] varchar(255) NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMAuObjType] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Name] nvarchar(255) NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMAuEntity] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [ObjectPrimaryKey] nvarchar(38) NOT NULL, - + [OperationTime] DATETIME NOT NULL, - + [OperationType] nvarchar(100) NOT NULL, - + [ExecutionResult] nvarchar(12) NOT NULL, - + [Source] nvarchar(255) NOT NULL, - + [SerializedField] nvarchar(max) NULL, - + [User_m0] uniqueidentifier NOT NULL, - + [ObjectType_m0] uniqueidentifier NOT NULL, - + PRIMARY KEY ([primaryKey])) - + CREATE TABLE [STORMAuField] ( - + [primaryKey] uniqueidentifier NOT NULL, - + [Field] nvarchar(100) NOT NULL, - + [OldValue] nvarchar(max) NULL, - + [NewValue] nvarchar(max) NULL, - + [MainChange_m0] uniqueidentifier NULL, - + [AuditEntity_m0] uniqueidentifier NOT NULL, - + PRIMARY KEY ([primaryKey])) - - + + ALTER TABLE [Лес] ADD CONSTRAINT [Лес_FСтрана_0] FOREIGN KEY ([Страна]) REFERENCES [Страна] @@ -884,6 +1037,12 @@ CREATE INDEX TestDetailWithCicle_IParent on [TestDetailWithCicle] ([Parent]) ALTER TABLE [TestDetailWithCicle] ADD CONSTRAINT [TestDetailWithCicle_FTestMaster_0] FOREIGN KEY ([TestMaster]) REFERENCES [TestMaster] CREATE INDEX TestDetailWithCicle_ITestMaster on [TestDetailWithCicle] ([TestMaster]) + ALTER TABLE [LegoBlockCustomPanel] ADD CONSTRAINT [LegoBlockCustomPanel_FLegoPanelAngle_0] FOREIGN KEY ([PanelAngle]) REFERENCES [LegoPanelAngle] +CREATE INDEX LegoBlockCustomPanel_IPanelAngle on [LegoBlockCustomPanel] ([PanelAngle]) + + ALTER TABLE [LegoBlockCustomPanel] ADD CONSTRAINT [LegoBlockCustomPanel_FLegoBlock_0] FOREIGN KEY ([Block]) REFERENCES [LegoBlock] +CREATE INDEX LegoBlockCustomPanel_IBlock on [LegoBlockCustomPanel] ([Block]) + ALTER TABLE [Daughter] ADD CONSTRAINT [Daughter_FPerson_0] FOREIGN KEY ([Parent]) REFERENCES [Person] CREATE INDEX Daughter_IParent on [Daughter] ([Parent]) @@ -911,9 +1070,18 @@ CREATE INDEX Книга_IАвтор1 on [Книга] ([Автор1]) ALTER TABLE [Книга] ADD CONSTRAINT [Книга_FБиблиотека_0] FOREIGN KEY ([Библиотека1]) REFERENCES [Библиотека] CREATE INDEX Книга_IБиблиотека1 on [Книга] ([Библиотека1]) + ALTER TABLE [LegoBlock] ADD CONSTRAINT [LegoBlock_FLegoMaterial_0] FOREIGN KEY ([Material]) REFERENCES [LegoMaterial] +CREATE INDEX LegoBlock_IMaterial on [LegoBlock] ([Material]) + + ALTER TABLE [LegoBlock] ADD CONSTRAINT [LegoBlock_FLegoBlockColor_0] FOREIGN KEY ([Color]) REFERENCES [LegoBlockColor] +CREATE INDEX LegoBlock_IColor on [LegoBlock] ([Color]) + ALTER TABLE [Перелом] ADD CONSTRAINT [Перелом_FЛапа_0] FOREIGN KEY ([Лапа_m0]) REFERENCES [Лапа] CREATE INDEX Перелом_IЛапа_m0 on [Перелом] ([Лапа_m0]) + ALTER TABLE [LegoDevice] ADD CONSTRAINT [LegoDevice_FLegoBlockColor_0] FOREIGN KEY ([Color]) REFERENCES [LegoBlockColor] +CREATE INDEX LegoDevice_IColor on [LegoDevice] ([Color]) + ALTER TABLE [Наследник] ADD CONSTRAINT [Наследник_FМастер_0] FOREIGN KEY ([Мастер]) REFERENCES [Мастер] CREATE INDEX Наследник_IМастер on [Наследник] ([Мастер]) @@ -929,6 +1097,12 @@ CREATE INDEX Мастер_IМастер2 on [Мастер] ([Мастер2]) ALTER TABLE [Блоха] ADD CONSTRAINT [Блоха_FМедведь_0] FOREIGN KEY ([МедведьОбитания]) REFERENCES [Медведь] CREATE INDEX Блоха_IМедведьОбитания on [Блоха] ([МедведьОбитания]) + ALTER TABLE [LegoPatent] ADD CONSTRAINT [LegoPatent_FLegoBlock_0] FOREIGN KEY ([/BaseLegoBlock_m0]) REFERENCES [LegoBlock] +CREATE INDEX LegoPatent_I/BaseLegoBlock_m0 on [LegoPatent] ([/BaseLegoBlock_m0]) + + ALTER TABLE [LegoPatent] ADD CONSTRAINT [LegoPatent_FLegoDevice_0] FOREIGN KEY ([/BaseLegoBlock_m1]) REFERENCES [LegoDevice] +CREATE INDEX LegoPatent_I/BaseLegoBlock_m1 on [LegoPatent] ([/BaseLegoBlock_m1]) + ALTER TABLE [Лапа] ADD CONSTRAINT [Лапа_FТипЛапы_0] FOREIGN KEY ([ТипЛапы_m0]) REFERENCES [ТипЛапы] CREATE INDEX Лапа_IТипЛапы_m0 on [Лапа] ([ТипЛапы_m0]) @@ -944,6 +1118,12 @@ CREATE INDEX Берлога_IМедведь on [Берлога] ([Медведь ALTER TABLE [Котенок] ADD CONSTRAINT [Котенок_FКошка_0] FOREIGN KEY ([Кошка_m0]) REFERENCES [Кошка] CREATE INDEX Котенок_IКошка_m0 on [Котенок] ([Кошка_m0]) + ALTER TABLE [LegoBlockBottomPanel] ADD CONSTRAINT [LegoBlockBottomPanel_FLegoBlock_0] FOREIGN KEY ([Block]) REFERENCES [LegoBlock] +CREATE INDEX LegoBlockBottomPanel_IBlock on [LegoBlockBottomPanel] ([Block]) + + ALTER TABLE [LegoBlockTopPanelHole] ADD CONSTRAINT [LegoBlockTopPanelHole_FLegoBlockTopPanel_0] FOREIGN KEY ([TopPanel]) REFERENCES [LegoBlockTopPanel] +CREATE INDEX LegoBlockTopPanelHole_ITopPanel on [LegoBlockTopPanelHole] ([TopPanel]) + ALTER TABLE [Детейл2] ADD CONSTRAINT [Детейл2_FДетейл_0] FOREIGN KEY ([Детейл_m0]) REFERENCES [Детейл] CREATE INDEX Детейл2_IДетейл_m0 on [Детейл2] ([Детейл_m0]) @@ -956,6 +1136,12 @@ CREATE INDEX Журнал_IАвтор2 on [Журнал] ([Автор2]) ALTER TABLE [Журнал] ADD CONSTRAINT [Журнал_FБиблиотека_0] FOREIGN KEY ([Библиотека2]) REFERENCES [Библиотека] CREATE INDEX Журнал_IБиблиотека2 on [Журнал] ([Библиотека2]) + ALTER TABLE [LegoBlockTopPanel] ADD CONSTRAINT [LegoBlockTopPanel_FLegoSocketStandard_0] FOREIGN KEY ([SocketStandard]) REFERENCES [LegoSocketStandard] +CREATE INDEX LegoBlockTopPanel_ISocketStandard on [LegoBlockTopPanel] ([SocketStandard]) + + ALTER TABLE [LegoBlockTopPanel] ADD CONSTRAINT [LegoBlockTopPanel_FLegoBlock_0] FOREIGN KEY ([Block]) REFERENCES [LegoBlock] +CREATE INDEX LegoBlockTopPanel_IBlock on [LegoBlockTopPanel] ([Block]) + ALTER TABLE [Кошка] ADD CONSTRAINT [Кошка_FПорода_0] FOREIGN KEY ([Порода_m0]) REFERENCES [Порода] CREATE INDEX Кошка_IПорода_m0 on [Кошка] ([Порода_m0]) @@ -981,5 +1167,5 @@ CREATE INDEX ДетейлНаследник_IБазовыйКласс_m1 on [Д ALTER TABLE [STORMAuField] ADD CONSTRAINT [STORMAuField_FSTORMAuField_0] FOREIGN KEY ([MainChange_m0]) REFERENCES [STORMAuField] - ALTER TABLE [STORMAuField] ADD CONSTRAINT [STORMAuField_FSTORMAuEntity_0] FOREIGN KEY ([AuditEntity_m0]) REFERENCES [STORMAuEntity] - + ALTER TABLE [STORMAuField] ADD CONSTRAINT [STORMAuField_FSTORMAuEntity_0] FOREIGN KEY ([AuditEntity_m0]) REFERENCES [STORMAuEntity] + diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/NewPlatform.Flexberry.ORM.ODataService.Tests.crp b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/NewPlatform.Flexberry.ORM.ODataService.Tests.crp index c5f0326c..8c021c46 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/NewPlatform.Flexberry.ORM.ODataService.Tests.crp +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/NewPlatform.Flexberry.ORM.ODataService.Tests.crp @@ -1,5 +1,5 @@ - + @@ -10,6 +10,16 @@ + + + + + + + + + + @@ -107,7 +117,9 @@ - + + + @@ -121,6 +133,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -178,10 +210,10 @@ - - - - + + + + @@ -201,6 +233,16 @@ + + + + + + + + + + @@ -223,7 +265,7 @@ - + @@ -248,6 +290,18 @@ + + + + + + + + + + + + @@ -257,6 +311,15 @@ + + + + + + + + + @@ -320,6 +383,16 @@ + + + + + + + + + + @@ -410,6 +483,18 @@ + + + + + + + + + + + + @@ -450,7 +535,7 @@ - + @@ -507,6 +592,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -525,7 +638,7 @@ - + @@ -541,7 +654,7 @@ - + @@ -571,6 +684,16 @@ + + + + + + + + + + @@ -719,6 +842,10 @@ + + + + @@ -743,14 +870,26 @@ + + + + + + + + + + + + @@ -767,52 +906,76 @@ - + - + - + + + + + - + + + + + - + - + + + + + - + - + + + + + - + - + + + + + + + + + @@ -825,6 +988,10 @@ + + + + @@ -835,61 +1002,62 @@ - + - + - + + - + - + - + - + - + - + - + - + diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/OracleScript.sql b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/OracleScript.sql index d3755daf..2eff38dd 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/OracleScript.sql +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/OracleScript.sql @@ -1,969 +1,1144 @@ - - + + + +CREATE TABLE "LegoPanelAngle" +( + + "primaryKey" RAW(16) NOT NULL, + + "Name" NVARCHAR2(255) NULL, + + "Angle" NUMBER(10) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Driver" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" NVARCHAR2(255) NULL, - + "CarCount" NUMBER(10) NULL, - + "Documents" NUMBER(1) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Страна" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Master" ( - + "primaryKey" RAW(16) NOT NULL, - + "property" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Лес" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "Площадь" NUMBER(10) NULL, - + "Заповедник" NUMBER(1) NULL, - + "ДатаПослОсмотра" DATE NULL, - + "Страна" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Son" ( - + "primaryKey" RAW(16) NOT NULL, - + "SuspendersColor" NVARCHAR2(255) NULL, - + "Name" NVARCHAR2(255) NULL, - + "Parent" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "ТипПороды" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "ДатаРегистрации" DATE NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Порода" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "ТипПороды_m0" RAW(16) NULL, - + "Иерархия_m0" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "TestDetailWithCicle" ( - + "primaryKey" RAW(16) NOT NULL, - + "TestDetailName" NVARCHAR2(255) NULL, - + "Parent" RAW(16) NULL, - + "TestMaster" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoBlockCustomPanel" +( + + "primaryKey" RAW(16) NOT NULL, + + "Orientation" NVARCHAR2(255) NULL, + + "Position" NVARCHAR2(255) NULL, + + "PanelAngle" RAW(16) NULL, + + "Block" RAW(16) NOT NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Daughter" ( - + "primaryKey" RAW(16) NOT NULL, - + "DressColor" NVARCHAR2(255) NULL, - + "Name" NVARCHAR2(255) NULL, - + "Parent" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "КлассСМножТипов" ( - + "primaryKey" RAW(16) NOT NULL, - + "PropertyGeography" CLOB NULL, - - "PropertyEnum" NVARCHAR2(6) NULL, - + + "PropertyEnum" NVARCHAR2(0) NULL, + "PropertyBool" NUMBER(1) NULL, - + "PropertyInt" NUMBER(10) NULL, - + "PropertyDateTime" DATE NULL, - + "PropertyString" NVARCHAR2(255) NULL, - + "PropertyFloat" FLOAT(53) NULL, - + "PropertyDouble" FLOAT(126) NULL, - + "PropertyDecimal" NUMBER(38) NULL, - + "PropertySystemNullableDateTime" DATE NULL, - + "PropertySystemNullableInt" NUMBER(10) NULL, - + "PropertySystemNullableGuid" RAW(16) NULL, - + "PropertySystemNullableDecimal" NUMBER(38) NULL, - + "PropStormnetNullableDateTime" DATE NULL, - + "PropertyStormnetNullableInt" NUMBER(10) NULL, - + "PropertyStormnetKeyGuid" RAW(16) NULL, - + "PropStormnetNullableDecimal" NUMBER(38) NULL, - + "PropertyStormnetPartliedDate" NVARCHAR2(255) NULL, - + "PropertyStormnetContact" CLOB NULL, - + "PropertyStormnetBlob" CLOB NULL, - + "PropertyStormnetEvent" CLOB NULL, - + "PropertyStormnetGeoData" CLOB NULL, - + "PropertyStormnetImage" CLOB NULL, - + "PropertyStormnetWebFile" CLOB NULL, - + "PropertyStormnetFile" CLOB NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Медведь" ( - + "primaryKey" RAW(16) NOT NULL, - + "ПолеБС" NVARCHAR2(255) NULL, - + "ПорядковыйНомер" NUMBER(10) NULL, - + "Вес" NUMBER(10) NULL, - + "ЦветГлаз" NVARCHAR2(255) NULL, - + "Пол" NVARCHAR2(9) NULL, - + "ДатаРождения" DATE NULL, - + "CreateTime" DATE NULL, - + "Creator" NVARCHAR2(255) NULL, - + "EditTime" DATE NULL, - + "Editor" NVARCHAR2(255) NULL, - + "Страна" RAW(16) NULL, - + "ЛесОбитания" RAW(16) NULL, - + "Мама" RAW(16) NULL, - + "Папа" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoBlockColor" +( + + "primaryKey" RAW(16) NOT NULL, + + "Name" NVARCHAR2(255) NULL, + + "ColorNumber" NUMBER(10) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Детейл" ( - + "primaryKey" RAW(16) NOT NULL, - + "prop1" NUMBER(10) NULL, - + "БазовыйКласс_m0" RAW(16) NULL, - + "БазовыйКласс_m1" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "ДочернийКласс" ( - + "primaryKey" RAW(16) NOT NULL, - + "ChildProperty" NVARCHAR2(255) NULL, - + "PropertyGeography" CLOB NULL, - - "PropertyEnum" NVARCHAR2(6) NULL, - + + "PropertyEnum" NVARCHAR2(0) NULL, + "PropertyBool" NUMBER(1) NULL, - + "PropertyInt" NUMBER(10) NULL, - + "PropertyDateTime" DATE NULL, - + "PropertyString" NVARCHAR2(255) NULL, - + "PropertyFloat" FLOAT(53) NULL, - + "PropertyDouble" FLOAT(126) NULL, - + "PropertyDecimal" NUMBER(38) NULL, - + "PropertySystemNullableDateTime" DATE NULL, - + "PropertySystemNullableInt" NUMBER(10) NULL, - + "PropertySystemNullableGuid" RAW(16) NULL, - + "PropertySystemNullableDecimal" NUMBER(38) NULL, - + "PropStormnetNullableDateTime" DATE NULL, - + "PropertyStormnetNullableInt" NUMBER(10) NULL, - + "PropertyStormnetKeyGuid" RAW(16) NULL, - + "PropStormnetNullableDecimal" NUMBER(38) NULL, - + "PropertyStormnetPartliedDate" NVARCHAR2(255) NULL, - + "PropertyStormnetContact" CLOB NULL, - + "PropertyStormnetBlob" CLOB NULL, - + "PropertyStormnetEvent" CLOB NULL, - + "PropertyStormnetGeoData" CLOB NULL, - + "PropertyStormnetImage" CLOB NULL, - + "PropertyStormnetWebFile" CLOB NULL, - + "PropertyStormnetFile" CLOB NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Книга" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "Автор1" RAW(16) NOT NULL, - + "Библиотека1" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoBlock" +( + + "primaryKey" RAW(16) NOT NULL, + + "Width" NUMBER(10) NULL, + + "Height" NUMBER(10) NULL, + + "Top" NUMBER(10) NULL, + + "Configuration" NVARCHAR2(255) NULL, + + "Name" NVARCHAR2(255) NULL, + + "BlockId" NUMBER(10) NULL, + + "Material" RAW(16) NULL, + + "Color" RAW(16) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Person" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoSocketStandard" +( + + "primaryKey" RAW(16) NOT NULL, + + "Name" NVARCHAR2(255) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Перелом" ( - + "primaryKey" RAW(16) NOT NULL, - + "Дата" DATE NULL, - - "Тип" NVARCHAR2(8) NULL, - + + "Тип" NVARCHAR2(0) NULL, + "Лапа_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "БазовыйКласс" ( - + "primaryKey" RAW(16) NOT NULL, - + "Свойство1" NVARCHAR2(255) NULL, - + "Свойство2" NUMBER(10) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "ПоставщикКниг" ( - + "primaryKey" RAW(16) NOT NULL, - + "Ссылка" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Мастер2" ( - + "primaryKey" RAW(16) NOT NULL, - + "свойство2" NUMBER(10) NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoDevice" +( + + "primaryKey" RAW(16) NOT NULL, + + "Description" NVARCHAR2(255) NULL, + + "Electricity" NUMBER(1) NULL, + + "Name" NVARCHAR2(255) NULL, + + "BlockId" NUMBER(10) NULL, + + "Color" RAW(16) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Наследник" ( - + "primaryKey" RAW(16) NOT NULL, - + "Свойство" FLOAT(126) NULL, - + "Свойство1" NVARCHAR2(255) NULL, - + "Свойство2" NUMBER(10) NULL, - + "Мастер" RAW(16) NULL, - + "Master" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Car" ( - + "primaryKey" RAW(16) NOT NULL, - + "Number" NVARCHAR2(255) NULL, - + "Model" NVARCHAR2(255) NULL, - - "TipCar" NVARCHAR2(9) NULL, - + + "TipCar" NVARCHAR2(0) NULL, + "driver" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Мастер" ( - + "primaryKey" RAW(16) NOT NULL, - + "prop" NVARCHAR2(255) NULL, - + "Мастер2" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Блоха" ( - + "primaryKey" RAW(16) NOT NULL, - + "Кличка" NVARCHAR2(255) NULL, - + "МедведьОбитания" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoPatent" +( + + "primaryKey" RAW(16) NOT NULL, + + "Name" NVARCHAR2(255) NULL, + + "Date" DATE NULL, + + "Authors" NVARCHAR2(255) NULL, + + "Description" NVARCHAR2(255) NULL, + + "/BaseLegoBlock_m0" RAW(16) NULL, + + "/BaseLegoBlock_m1" RAW(16) NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "Лапа" ( - + "primaryKey" RAW(16) NOT NULL, - + "Цвет" NVARCHAR2(255) NULL, - + "Размер" NUMBER(10) NULL, - + "ДатаРождения" DATE NULL, - + "БылиЛиПереломы" NUMBER(1) NULL, - - "Сторона" NVARCHAR2(11) NULL, - + + "Сторона" NVARCHAR2(0) NULL, + "Номер" NUMBER(10) NULL, - + "РазмерDouble" FLOAT(126) NULL, - + "РазмерFloat" FLOAT(53) NULL, - + "РазмерDecimal" NUMBER(38) NULL, - + "ТипЛапы_m0" RAW(16) NULL, - + "Кошка_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "КлассСоСтрокКл" ( - + "StoragePrimaryKey" NVARCHAR2(255) NOT NULL, - + PRIMARY KEY ("StoragePrimaryKey") ) ; - + CREATE TABLE "Берлога" ( - + "primaryKey" RAW(16) NOT NULL, - + "ПолеБС" NVARCHAR2(255) NULL, - + "Наименование" NVARCHAR2(255) NULL, - + "Комфортность" NUMBER(10) NULL, - + "Заброшена" NUMBER(1) NULL, - + "Сертификат" CLOB NULL, - + "CertString" CLOB NULL, - + "ЛесРасположения" RAW(16) NULL, - + "Медведь" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Автор" ( - + "primaryKey" RAW(16) NOT NULL, - + "Имя" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "TestMaster" ( - + "primaryKey" RAW(16) NOT NULL, - + "TestMasterName" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Котенок" ( - + "primaryKey" RAW(16) NOT NULL, - + "КличкаКотенка" NVARCHAR2(255) NULL, - + "Глупость" NUMBER(10) NULL, - + "Кошка_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Библиотека" ( - + "primaryKey" RAW(16) NOT NULL, - + "Адрес" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoMaterial" +( + + "primaryKey" RAW(16) NOT NULL, + + "Name" NVARCHAR2(255) NULL, + + PRIMARY KEY ("primaryKey") +) ; + -CREATE TABLE "Детейл2" +CREATE TABLE "LegoBlockBottomPanel" ( + + "primaryKey" RAW(16) NOT NULL, + + "WidthCount" NUMBER(10) NULL, + + "HeightCount" NUMBER(10) NULL, + + "Block" RAW(16) NOT NULL, + + PRIMARY KEY ("primaryKey") +) ; + +CREATE TABLE "LegoBlockTopPanelHole" +( + "primaryKey" RAW(16) NOT NULL, + + "Position" NVARCHAR2(255) NULL, + + "TopPanel" RAW(16) NOT NULL, + + PRIMARY KEY ("primaryKey") +) ; + +CREATE TABLE "Детейл2" +( + + "primaryKey" RAW(16) NOT NULL, + "prop2" NVARCHAR2(255) NULL, - + "Детейл_m0" RAW(16) NULL, - + "Детейл_m1" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Журнал" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "Номер" NUMBER(10) NULL, - + "Автор2" RAW(16) NOT NULL, - + "Библиотека2" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; + +CREATE TABLE "LegoBlockTopPanel" +( + + "primaryKey" RAW(16) NOT NULL, + + "WidthCount" NUMBER(10) NULL, + + "HeightCount" NUMBER(10) NULL, + + "SocketStandard" RAW(16) NULL, + + "Block" RAW(16) NOT NULL, + + PRIMARY KEY ("primaryKey") +) ; + CREATE TABLE "ТипЛапы" ( - + "primaryKey" RAW(16) NOT NULL, - + "Название" NVARCHAR2(255) NULL, - + "Актуально" NUMBER(1) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "КлассStoredDerived" ( - + "primaryKey" RAW(16) NOT NULL, - + "StrAttr2" NVARCHAR2(255) NULL, - + "StrAttr" NVARCHAR2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "Кошка" ( - + "primaryKey" RAW(16) NOT NULL, - + "Кличка" NVARCHAR2(255) NULL, - + "ДатаРождения" DATE NULL, - - "Тип" NVARCHAR2(11) NULL, - + + "Тип" NVARCHAR2(0) NULL, + "ПородаСтрокой" NVARCHAR2(255) NULL, - + "Агрессивная" NUMBER(1) NULL, - + "УсыСлева" NUMBER(10) NULL, - + "УсыСправа" NUMBER(10) NULL, - + "Порода_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "ДетейлНаследник" ( - + "primaryKey" RAW(16) NOT NULL, - + "prop3" NVARCHAR2(255) NULL, - + "prop1" NUMBER(10) NULL, - + "БазовыйКласс_m0" RAW(16) NULL, - + "БазовыйКласс_m1" RAW(16) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMNETLOCKDATA" ( - + "LockKey" NVARCHAR2(300) NOT NULL, - + "UserName" NVARCHAR2(300) NOT NULL, - + "LockDate" DATE NULL, - + PRIMARY KEY ("LockKey") ) ; - + CREATE TABLE "STORMSETTINGS" ( - + "primaryKey" RAW(16) NOT NULL, - + "Module" nvarchar2(1000) NULL, - + "Name" nvarchar2(255) NULL, - + "Value" CLOB NULL, - + "User" nvarchar2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMAdvLimit" ( - + "primaryKey" RAW(16) NOT NULL, - + "User" nvarchar2(255) NULL, - + "Published" NUMBER(1) NULL, - + "Module" nvarchar2(255) NULL, - + "Name" nvarchar2(255) NULL, - + "Value" CLOB NULL, - + "HotKeyData" NUMBER(10) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMFILTERSETTING" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" nvarchar2(255) NOT NULL, - + "DataObjectView" nvarchar2(255) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMWEBSEARCH" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" nvarchar2(255) NOT NULL, - + "Order" NUMBER(10) NOT NULL, - + "PresentView" nvarchar2(255) NOT NULL, - + "DetailedView" nvarchar2(255) NOT NULL, - + "FilterSetting_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMFILTERDETAIL" ( - + "primaryKey" RAW(16) NOT NULL, - + "Caption" nvarchar2(255) NOT NULL, - + "DataObjectView" nvarchar2(255) NOT NULL, - + "ConnectMasterProp" nvarchar2(255) NOT NULL, - + "OwnerConnectProp" nvarchar2(255) NULL, - + "FilterSetting_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMFILTERLOOKUP" ( - + "primaryKey" RAW(16) NOT NULL, - + "DataObjectType" nvarchar2(255) NOT NULL, - + "Container" nvarchar2(255) NULL, - + "ContainerTag" nvarchar2(255) NULL, - + "FieldsToView" nvarchar2(255) NULL, - + "FilterSetting_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "UserSetting" ( - + "primaryKey" RAW(16) NOT NULL, - + "AppName" nvarchar2(256) NULL, - + "UserName" nvarchar2(512) NULL, - + "UserGuid" RAW(16) NULL, - + "ModuleName" nvarchar2(1024) NULL, - + "ModuleGuid" RAW(16) NULL, - + "SettName" nvarchar2(256) NULL, - + "SettGuid" RAW(16) NULL, - + "SettLastAccessTime" DATE NULL, - + "StrVal" nvarchar2(256) NULL, - + "TxtVal" CLOB NULL, - + "IntVal" NUMBER(10) NULL, - + "BoolVal" NUMBER(1) NULL, - + "GuidVal" RAW(16) NULL, - + "DecimalVal" NUMBER(20,10) NULL, - + "DateTimeVal" DATE NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "ApplicationLog" ( - + "primaryKey" RAW(16) NOT NULL, - + "Category" nvarchar2(64) NULL, - + "EventId" NUMBER(10) NULL, - + "Priority" NUMBER(10) NULL, - + "Severity" nvarchar2(32) NULL, - + "Title" nvarchar2(256) NULL, - + "Timestamp" DATE NULL, - + "MachineName" nvarchar2(32) NULL, - + "AppDomainName" nvarchar2(512) NULL, - + "ProcessId" nvarchar2(256) NULL, - + "ProcessName" nvarchar2(512) NULL, - + "ThreadName" nvarchar2(512) NULL, - + "Win32ThreadId" nvarchar2(128) NULL, - + "Message" nvarchar2(2000) NULL, - + "FormattedMessage" nvarchar2(2000) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMAG" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" nvarchar2(80) NOT NULL, - + "Login" nvarchar2(50) NULL, - + "Pwd" nvarchar2(50) NULL, - + "IsUser" NUMBER(1) NOT NULL, - + "IsGroup" NUMBER(1) NOT NULL, - + "IsRole" NUMBER(1) NOT NULL, - + "ConnString" nvarchar2(255) NULL, - + "Enabled" NUMBER(1) NULL, - + "Email" nvarchar2(80) NULL, - + "Comment" CLOB NULL, - + "CreateTime" DATE NULL, - + "Creator" nvarchar2(255) NULL, - + "EditTime" DATE NULL, - + "Editor" nvarchar2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMLG" ( - + "primaryKey" RAW(16) NOT NULL, - + "Group_m0" RAW(16) NOT NULL, - + "User_m0" RAW(16) NOT NULL, - + "CreateTime" DATE NULL, - + "Creator" nvarchar2(255) NULL, - + "EditTime" DATE NULL, - + "Editor" nvarchar2(255) NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMAuObjType" ( - + "primaryKey" RAW(16) NOT NULL, - + "Name" nvarchar2(255) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMAuEntity" ( - + "primaryKey" RAW(16) NOT NULL, - + "ObjectPrimaryKey" nvarchar2(38) NOT NULL, - + "OperationTime" DATE NOT NULL, - + "OperationType" nvarchar2(100) NOT NULL, - + "ExecutionResult" nvarchar2(12) NOT NULL, - + "Source" nvarchar2(255) NOT NULL, - + "SerializedField" nvarchar2(2000) NULL, - + "User_m0" RAW(16) NOT NULL, - + "ObjectType_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - + CREATE TABLE "STORMAuField" ( - + "primaryKey" RAW(16) NOT NULL, - + "Field" nvarchar2(100) NOT NULL, - + "OldValue" nvarchar2(2000) NULL, - + "NewValue" nvarchar2(2000) NULL, - + "MainChange_m0" RAW(16) NULL, - + "AuditEntity_m0" RAW(16) NOT NULL, - + PRIMARY KEY ("primaryKey") ) ; - - + + ALTER TABLE "Лес" ADD CONSTRAINT "Лес_FСтрана_0" FOREIGN KEY ("Страна") REFERENCES "Страна" ("primaryKey"); @@ -995,6 +1170,16 @@ ALTER TABLE "TestDetailWithCicle" CREATE INDEX "TestDetailWithCicle_ITest_3425" on "TestDetailWithCicle" ("TestMaster"); +ALTER TABLE "LegoBlockCustomPanel" + ADD CONSTRAINT "LegoBlockCustomPanel_FLeg_5205" FOREIGN KEY ("PanelAngle") REFERENCES "LegoPanelAngle" ("primaryKey"); + +CREATE INDEX "LegoBlockCustomPanel_IPan_9519" on "LegoBlockCustomPanel" ("PanelAngle"); + +ALTER TABLE "LegoBlockCustomPanel" + ADD CONSTRAINT "LegoBlockCustomPanel_FLeg_1816" FOREIGN KEY ("Block") REFERENCES "LegoBlock" ("primaryKey"); + +CREATE INDEX "LegoBlockCustomPanel_IBlock" on "LegoBlockCustomPanel" ("Block"); + ALTER TABLE "Daughter" ADD CONSTRAINT "Daughter_FPerson_0" FOREIGN KEY ("Parent") REFERENCES "Person" ("primaryKey"); @@ -1040,11 +1225,26 @@ ALTER TABLE "Книга" CREATE INDEX "Книга_IБиблио_4875" on "Книга" ("Библиотека1"); +ALTER TABLE "LegoBlock" + ADD CONSTRAINT "LegoBlock_FLegoMaterial_0" FOREIGN KEY ("Material") REFERENCES "LegoMaterial" ("primaryKey"); + +CREATE INDEX "LegoBlock_IMaterial" on "LegoBlock" ("Material"); + +ALTER TABLE "LegoBlock" + ADD CONSTRAINT "LegoBlock_FLegoBlockColor_0" FOREIGN KEY ("Color") REFERENCES "LegoBlockColor" ("primaryKey"); + +CREATE INDEX "LegoBlock_IColor" on "LegoBlock" ("Color"); + ALTER TABLE "Перелом" ADD CONSTRAINT "Перелом_FЛапа_0" FOREIGN KEY ("Лапа_m0") REFERENCES "Лапа" ("primaryKey"); CREATE INDEX "Перелом_IЛапа_m0" on "Перелом" ("Лапа_m0"); +ALTER TABLE "LegoDevice" + ADD CONSTRAINT "LegoDevice_FLegoBlockColor_0" FOREIGN KEY ("Color") REFERENCES "LegoBlockColor" ("primaryKey"); + +CREATE INDEX "LegoDevice_IColor" on "LegoDevice" ("Color"); + ALTER TABLE "Наследник" ADD CONSTRAINT "Наследник_FМас_278" FOREIGN KEY ("Мастер") REFERENCES "Мастер" ("primaryKey"); @@ -1070,6 +1270,16 @@ ALTER TABLE "Блоха" CREATE INDEX "Блоха_IМедвед_6073" on "Блоха" ("МедведьОбитания"); +ALTER TABLE "LegoPatent" + ADD CONSTRAINT "LegoPatent_FLegoBlock_0" FOREIGN KEY ("/BaseLegoBlock_m0") REFERENCES "LegoBlock" ("primaryKey"); + +CREATE INDEX "LegoPatent_I/BaseLegoBlock_m0" on "LegoPatent" ("/BaseLegoBlock_m0"); + +ALTER TABLE "LegoPatent" + ADD CONSTRAINT "LegoPatent_FLegoDevice_0" FOREIGN KEY ("/BaseLegoBlock_m1") REFERENCES "LegoDevice" ("primaryKey"); + +CREATE INDEX "LegoPatent_I/BaseLegoBlock_m1" on "LegoPatent" ("/BaseLegoBlock_m1"); + ALTER TABLE "Лапа" ADD CONSTRAINT "Лапа_FТипЛапы_0" FOREIGN KEY ("ТипЛапы_m0") REFERENCES "ТипЛапы" ("primaryKey"); @@ -1095,6 +1305,16 @@ ALTER TABLE "Котенок" CREATE INDEX "Котенок_IКошка_m0" on "Котенок" ("Кошка_m0"); +ALTER TABLE "LegoBlockBottomPanel" + ADD CONSTRAINT "LegoBlockBottomPanel_FLeg_6473" FOREIGN KEY ("Block") REFERENCES "LegoBlock" ("primaryKey"); + +CREATE INDEX "LegoBlockBottomPanel_IBlock" on "LegoBlockBottomPanel" ("Block"); + +ALTER TABLE "LegoBlockTopPanelHole" + ADD CONSTRAINT "LegoBlockTopPanelHole_FLe_1402" FOREIGN KEY ("TopPanel") REFERENCES "LegoBlockTopPanel" ("primaryKey"); + +CREATE INDEX "LegoBlockTopPanelHole_ITo_4968" on "LegoBlockTopPanelHole" ("TopPanel"); + ALTER TABLE "Детейл2" ADD CONSTRAINT "Детейл2_FДетейл_0" FOREIGN KEY ("Детейл_m0") REFERENCES "Детейл" ("primaryKey"); @@ -1115,6 +1335,16 @@ ALTER TABLE "Журнал" CREATE INDEX "Журнал_IБибли_1176" on "Журнал" ("Библиотека2"); +ALTER TABLE "LegoBlockTopPanel" + ADD CONSTRAINT "LegoBlockTopPanel_FLegoSo_7170" FOREIGN KEY ("SocketStandard") REFERENCES "LegoSocketStandard" ("primaryKey"); + +CREATE INDEX "LegoBlockTopPanel_ISocket_2174" on "LegoBlockTopPanel" ("SocketStandard"); + +ALTER TABLE "LegoBlockTopPanel" + ADD CONSTRAINT "LegoBlockTopPanel_FLegoBlock_0" FOREIGN KEY ("Block") REFERENCES "LegoBlock" ("primaryKey"); + +CREATE INDEX "LegoBlockTopPanel_IBlock" on "LegoBlockTopPanel" ("Block"); + ALTER TABLE "Кошка" ADD CONSTRAINT "Кошка_FПорода_0" FOREIGN KEY ("Порода_m0") REFERENCES "Порода" ("primaryKey"); @@ -1156,5 +1386,5 @@ ALTER TABLE "STORMAuField" ALTER TABLE "STORMAuField" ADD CONSTRAINT "STORMAuField_FSTORMAuEntity_0" FOREIGN KEY ("AuditEntity_m0") REFERENCES "STORMAuEntity" ("primaryKey"); - - + + diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql index 7aeaeb91..b46e6357 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql @@ -1,975 +1,1178 @@ - - - - - -CREATE TABLE Driver ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - CarCount INT NULL, - - Documents BOOLEAN NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Страна ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Master ( - - primaryKey UUID NOT NULL, - - property VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Лес ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Площадь INT NULL, - - Заповедник BOOLEAN NULL, - - ДатаПослОсмотра TIMESTAMP(3) NULL, - - Страна UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Son ( - - primaryKey UUID NOT NULL, - - SuspendersColor VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Parent UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ТипПороды ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - ДатаРегистрации TIMESTAMP(3) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Порода ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - ТипПороды_m0 UUID NULL, - - Иерархия_m0 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE TestDetailWithCicle ( - - primaryKey UUID NOT NULL, - - TestDetailName VARCHAR(255) NULL, - - Parent UUID NULL, - - TestMaster UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Daughter ( - - primaryKey UUID NOT NULL, - - DressColor VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Parent UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассСМножТипов ( - - primaryKey UUID NOT NULL, - - PropertyGeography GEOMETRY NULL, - - PropertyEnum VARCHAR(6) NULL, - - PropertyBool BOOLEAN NULL, - - PropertyInt INT NULL, - - PropertyDateTime TIMESTAMP(3) NULL, - - PropertyString VARCHAR(255) NULL, - - PropertyFloat REAL NULL, - - PropertyDouble DOUBLE PRECISION NULL, - - PropertyDecimal DECIMAL NULL, - - PropertySystemNullableDateTime TIMESTAMP(3) NULL, - - PropertySystemNullableInt INT NULL, - - PropertySystemNullableGuid UUID NULL, - - PropertySystemNullableDecimal DECIMAL NULL, - - PropStormnetNullableDateTime TIMESTAMP(3) NULL, - - PropertyStormnetNullableInt INT NULL, - - PropertyStormnetKeyGuid UUID NULL, - - PropStormnetNullableDecimal DECIMAL NULL, - - PropertyStormnetPartliedDate VARCHAR(255) NULL, - - PropertyStormnetContact TEXT NULL, - - PropertyStormnetBlob TEXT NULL, - - PropertyStormnetEvent TEXT NULL, - - PropertyStormnetGeoData TEXT NULL, - - PropertyStormnetImage TEXT NULL, - - PropertyStormnetWebFile TEXT NULL, - - PropertyStormnetFile TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Медведь ( - - primaryKey UUID NOT NULL, - - ПолеБС VARCHAR(255) NULL, - - ПорядковыйНомер INT NULL, - - Вес INT NULL, - - ЦветГлаз VARCHAR(255) NULL, - - Пол VARCHAR(9) NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - CreateTime TIMESTAMP(3) NULL, - - Creator VARCHAR(255) NULL, - - EditTime TIMESTAMP(3) NULL, - - Editor VARCHAR(255) NULL, - - Страна UUID NULL, - - ЛесОбитания UUID NULL, - - Мама UUID NULL, - - Папа UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Детейл ( - - primaryKey UUID NOT NULL, - - prop1 INT NULL, - - БазовыйКласс_m0 UUID NULL, - - БазовыйКласс_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ДочернийКласс ( - - primaryKey UUID NOT NULL, - - ChildProperty VARCHAR(255) NULL, - - PropertyGeography GEOMETRY NULL, - - PropertyEnum VARCHAR(6) NULL, - - PropertyBool BOOLEAN NULL, - - PropertyInt INT NULL, - - PropertyDateTime TIMESTAMP(3) NULL, - - PropertyString VARCHAR(255) NULL, - - PropertyFloat REAL NULL, - - PropertyDouble DOUBLE PRECISION NULL, - - PropertyDecimal DECIMAL NULL, - - PropertySystemNullableDateTime TIMESTAMP(3) NULL, - - PropertySystemNullableInt INT NULL, - - PropertySystemNullableGuid UUID NULL, - - PropertySystemNullableDecimal DECIMAL NULL, - - PropStormnetNullableDateTime TIMESTAMP(3) NULL, - - PropertyStormnetNullableInt INT NULL, - - PropertyStormnetKeyGuid UUID NULL, - - PropStormnetNullableDecimal DECIMAL NULL, - - PropertyStormnetPartliedDate VARCHAR(255) NULL, - - PropertyStormnetContact TEXT NULL, - - PropertyStormnetBlob TEXT NULL, - - PropertyStormnetEvent TEXT NULL, - - PropertyStormnetGeoData TEXT NULL, - - PropertyStormnetImage TEXT NULL, - - PropertyStormnetWebFile TEXT NULL, - - PropertyStormnetFile TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Книга ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Автор1 UUID NOT NULL, - - Библиотека1 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Person ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Перелом ( - - primaryKey UUID NOT NULL, - - Дата TIMESTAMP(3) NULL, - - Тип VARCHAR(8) NULL, - - Лапа_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE БазовыйКласс ( - - primaryKey UUID NOT NULL, - - Свойство1 VARCHAR(255) NULL, - - Свойство2 INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ПоставщикКниг ( - - primaryKey UUID NOT NULL, - - Ссылка UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Мастер2 ( - - primaryKey UUID NOT NULL, - - свойство2 INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Наследник ( - - primaryKey UUID NOT NULL, - - Свойство DOUBLE PRECISION NULL, - - Свойство1 VARCHAR(255) NULL, - - Свойство2 INT NULL, - - Мастер UUID NULL, - - Master UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Car ( - - primaryKey UUID NOT NULL, - - Number VARCHAR(255) NULL, - - Model VARCHAR(255) NULL, - - TipCar VARCHAR(9) NULL, - - driver UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Мастер ( - - primaryKey UUID NOT NULL, - - prop VARCHAR(255) NULL, - - Мастер2 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Блоха ( - - primaryKey UUID NOT NULL, - - Кличка VARCHAR(255) NULL, - - МедведьОбитания UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Лапа ( - - primaryKey UUID NOT NULL, - - Цвет VARCHAR(255) NULL, - - Размер INT NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - БылиЛиПереломы BOOLEAN NULL, - - Сторона VARCHAR(11) NULL, - - Номер INT NULL, - - РазмерDouble DOUBLE PRECISION NULL, - - РазмерFloat REAL NULL, - - РазмерDecimal DECIMAL NULL, - - ТипЛапы_m0 UUID NULL, - - Кошка_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассСоСтрокКл ( - - StoragePrimaryKey VARCHAR(255) NOT NULL, - - PRIMARY KEY (StoragePrimaryKey)); - - - -CREATE TABLE Берлога ( - - primaryKey UUID NOT NULL, - - ПолеБС VARCHAR(255) NULL, - - Наименование VARCHAR(255) NULL, - - Комфортность INT NULL, - - Заброшена BOOLEAN NULL, - - Сертификат TEXT NULL, - - CertString TEXT NULL, - - ЛесРасположения UUID NULL, - - Медведь UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Автор ( - - primaryKey UUID NOT NULL, - - Имя VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE TestMaster ( - - primaryKey UUID NOT NULL, - - TestMasterName VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Котенок ( - - primaryKey UUID NOT NULL, - - КличкаКотенка VARCHAR(255) NULL, - - Глупость INT NULL, - - Кошка_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Библиотека ( - - primaryKey UUID NOT NULL, - - Адрес VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Детейл2 ( - - primaryKey UUID NOT NULL, - - prop2 VARCHAR(255) NULL, - - Детейл_m0 UUID NULL, - - Детейл_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Журнал ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Номер INT NULL, - - Автор2 UUID NOT NULL, - - Библиотека2 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ТипЛапы ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Актуально BOOLEAN NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассStoredDerived ( - - primaryKey UUID NOT NULL, - - StrAttr2 VARCHAR(255) NULL, - - StrAttr VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Кошка ( - - primaryKey UUID NOT NULL, - - Кличка VARCHAR(255) NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - Тип VARCHAR(11) NULL, - - ПородаСтрокой VARCHAR(255) NULL, - - Агрессивная BOOLEAN NULL, - - УсыСлева INT NULL, - - УсыСправа INT NULL, - - Порода_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ДетейлНаследник ( - - primaryKey UUID NOT NULL, - - prop3 VARCHAR(255) NULL, - - prop1 INT NULL, - - БазовыйКласс_m0 UUID NULL, - - БазовыйКласс_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMNETLOCKDATA ( - - LockKey VARCHAR(300) NOT NULL, - - UserName VARCHAR(300) NOT NULL, - - LockDate TIMESTAMP(3) NULL, - - PRIMARY KEY (LockKey)); - - - -CREATE TABLE STORMSETTINGS ( - - primaryKey UUID NOT NULL, - - Module VARCHAR(1000) NULL, - - Name VARCHAR(255) NULL, - - Value TEXT NULL, - - "User" VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAdvLimit ( - - primaryKey UUID NOT NULL, - - "User" VARCHAR(255) NULL, - - Published BOOLEAN NULL, - - Module VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Value TEXT NULL, - - HotKeyData INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERSETTING ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - DataObjectView VARCHAR(255) NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMWEBSEARCH ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - "Order" INT NOT NULL, - - PresentView VARCHAR(255) NOT NULL, - - DetailedView VARCHAR(255) NOT NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERDETAIL ( - - primaryKey UUID NOT NULL, - - Caption VARCHAR(255) NOT NULL, - - DataObjectView VARCHAR(255) NOT NULL, - - ConnectMasterProp VARCHAR(255) NOT NULL, - - OwnerConnectProp VARCHAR(255) NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERLOOKUP ( - - primaryKey UUID NOT NULL, - - DataObjectType VARCHAR(255) NOT NULL, - - Container VARCHAR(255) NULL, - - ContainerTag VARCHAR(255) NULL, - - FieldsToView VARCHAR(255) NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE UserSetting ( - - primaryKey UUID NOT NULL, - - AppName VARCHAR(256) NULL, - - UserName VARCHAR(512) NULL, - - UserGuid UUID NULL, - - ModuleName VARCHAR(1024) NULL, - - ModuleGuid UUID NULL, - - SettName VARCHAR(256) NULL, - - SettGuid UUID NULL, - - SettLastAccessTime TIMESTAMP(3) NULL, - - StrVal VARCHAR(256) NULL, - - TxtVal TEXT NULL, - - IntVal INT NULL, - - BoolVal BOOLEAN NULL, - - GuidVal UUID NULL, - - DecimalVal DECIMAL(20,10) NULL, - - DateTimeVal TIMESTAMP(3) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ApplicationLog ( - - primaryKey UUID NOT NULL, - - Category VARCHAR(64) NULL, - - EventId INT NULL, - - Priority INT NULL, - - Severity VARCHAR(32) NULL, - - Title VARCHAR(256) NULL, - - Timestamp TIMESTAMP(3) NULL, - - MachineName VARCHAR(32) NULL, - - AppDomainName VARCHAR(512) NULL, - - ProcessId VARCHAR(256) NULL, - - ProcessName VARCHAR(512) NULL, - - ThreadName VARCHAR(512) NULL, - - Win32ThreadId VARCHAR(128) NULL, - - Message VARCHAR(2500) NULL, - - FormattedMessage TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuObjType ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuEntity ( - - primaryKey UUID NOT NULL, - - ObjectPrimaryKey VARCHAR(38) NOT NULL, - - OperationTime TIMESTAMP(3) NOT NULL, - - OperationType VARCHAR(100) NOT NULL, - - ExecutionResult VARCHAR(12) NOT NULL, - - Source VARCHAR(255) NOT NULL, - - SerializedField TEXT NULL, - - User_m0 UUID NOT NULL, - - ObjectType_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuField ( - - primaryKey UUID NOT NULL, - - Field VARCHAR(100) NOT NULL, - - OldValue TEXT NULL, - - NewValue TEXT NULL, - - MainChange_m0 UUID NULL, - - AuditEntity_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - - - ALTER TABLE Лес ADD CONSTRAINT FKaa1794af2f6142a48961b0e4ccc51848 FOREIGN KEY (Страна) REFERENCES Страна; -CREATE INDEX Indexd3bd1222072f531605e73e66656fe58296c8bfd2 on Лес (Страна); - - ALTER TABLE Son ADD CONSTRAINT FK0282df1d47e64c058705a0e620830a3e FOREIGN KEY (Parent) REFERENCES Person; -CREATE INDEX Indexdabfac99e0885f846c9da12b79c4cbd7894842d3 on Son (Parent); - - ALTER TABLE Порода ADD CONSTRAINT FKb4bd82bca1c64c15bd1b08943ca188f2 FOREIGN KEY (ТипПороды_m0) REFERENCES ТипПороды; -CREATE INDEX Index2b114b4677a6ea52b53a26c9a20bbaad606eff78 on Порода (ТипПороды_m0); - - ALTER TABLE Порода ADD CONSTRAINT FK5e45425b97064918a11bf967618b5601 FOREIGN KEY (Иерархия_m0) REFERENCES Порода; -CREATE INDEX Index14420958a87702decd2090afa109ad90292eb458 on Порода (Иерархия_m0); - - ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK386444132661465f826379a25ff07eb9 FOREIGN KEY (Parent) REFERENCES TestDetailWithCicle; -CREATE INDEX Index04dbb0ac2005483472591018ab7522c499fe5b38 on TestDetailWithCicle (Parent); - - ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK07792305977b467e91c94f4bcaf529a1 FOREIGN KEY (TestMaster) REFERENCES TestMaster; -CREATE INDEX Indexf8067bbec7353839c222df5b7aeba4ce65c1655f on TestDetailWithCicle (TestMaster); - - ALTER TABLE Daughter ADD CONSTRAINT FK54747311190e456492def3369e8d6f04 FOREIGN KEY (Parent) REFERENCES Person; -CREATE INDEX Index743208308d3826e12250804dbe77e02601e27402 on Daughter (Parent); -CREATE INDEX Indexc5f9d71c0704ea7b966afcfdc89dc7eabe2d0c43 on КлассСМножТипов USING gist (PropertyGeography); - - ALTER TABLE Медведь ADD CONSTRAINT FKf75c86f57d4545439dd2ef3b39079132 FOREIGN KEY (Страна) REFERENCES Страна; -CREATE INDEX Index6d8033494746b0bb87ba367c83d273dfa11b8f59 on Медведь (Страна); - - ALTER TABLE Медведь ADD CONSTRAINT FKf9df524b91e84978a3a43ffed8b21348 FOREIGN KEY (ЛесОбитания) REFERENCES Лес; -CREATE INDEX Index93be01a32cae64dc4b18705ade6683f41a32c367 on Медведь (ЛесОбитания); - - ALTER TABLE Медведь ADD CONSTRAINT FK068b3bc688e74155bb19cf90887b75c9 FOREIGN KEY (Мама) REFERENCES Медведь; -CREATE INDEX Index0b9f6ad0caded1971696ef6602e8a2831fa941b1 on Медведь (Мама); - - ALTER TABLE Медведь ADD CONSTRAINT FK2ed0032a856e4ebc9545e9c7970bb9f3 FOREIGN KEY (Папа) REFERENCES Медведь; -CREATE INDEX Index0ca403a899ac5a709a19bbb9ada47b0060e5b819 on Медведь (Папа); - - ALTER TABLE Детейл ADD CONSTRAINT FK6a1f82585ccb45feaf909dcb0ebe5be9 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; -CREATE INDEX Indexffdec7cb63189ed3e206c50c005f7daa0fe24f75 on Детейл (БазовыйКласс_m0); - - ALTER TABLE Детейл ADD CONSTRAINT FKd402e42b92c84a289ad44cdcea5ae205 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; -CREATE INDEX Indexafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc on Детейл (БазовыйКласс_m1); -CREATE INDEX Index10d981ac5288ea278311b6a711b43fa954b635a8 on ДочернийКласс USING gist (PropertyGeography); - - ALTER TABLE Книга ADD CONSTRAINT FK32d5cd8424c24e718538c5d6bf3f328f FOREIGN KEY (Автор1) REFERENCES Автор; -CREATE INDEX Index899896abd3f04413fb054cc8507b69f51489a8bc on Книга (Автор1); - - ALTER TABLE Книга ADD CONSTRAINT FKb31ab26ac04b4306a5b4b7509d12f949 FOREIGN KEY (Библиотека1) REFERENCES Библиотека; -CREATE INDEX Index84e4d9d5b6adc4bec48541216f15f396dd2b602c on Книга (Библиотека1); - - ALTER TABLE Перелом ADD CONSTRAINT FKdc74d74cfdc74d1a86e598a1e91e78b6 FOREIGN KEY (Лапа_m0) REFERENCES Лапа; -CREATE INDEX Index6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa on Перелом (Лапа_m0); - - ALTER TABLE Наследник ADD CONSTRAINT FK243d02e7397b47f5ad06ca9515451fc7 FOREIGN KEY (Мастер) REFERENCES Мастер; -CREATE INDEX Index28ac1d61524a43a59e67af57a855ad487d1f8141 on Наследник (Мастер); - - ALTER TABLE Наследник ADD CONSTRAINT FKfd65a736432840818ac1df1abe548b5f FOREIGN KEY (Master) REFERENCES Master; -CREATE INDEX Index0cb9ac2b0e7896223ed63c0c888c23aa86682b1e on Наследник (Master); - - ALTER TABLE Car ADD CONSTRAINT FK7855a291865545d39880b82dc9ecf0c2 FOREIGN KEY (driver) REFERENCES Driver; -CREATE INDEX Indexe86a1d047f4df342bf39a5af864aec2b40a3547a on Car (driver); - - ALTER TABLE Мастер ADD CONSTRAINT FKb86082afa25847a4ad1854d2212eef75 FOREIGN KEY (Мастер2) REFERENCES Мастер2; -CREATE INDEX Index0053148ab4597a6e8d749a7201b40246de6bba66 on Мастер (Мастер2); - - ALTER TABLE Блоха ADD CONSTRAINT FK0638c0ac26ee42988e88a96a7184efda FOREIGN KEY (МедведьОбитания) REFERENCES Медведь; -CREATE INDEX Indexb43131b348ee335105dd990a690720791b5dcba6 on Блоха (МедведьОбитания); - - ALTER TABLE Лапа ADD CONSTRAINT FKfa2eb2f3faef4ed28fb7373bbb3f4949 FOREIGN KEY (ТипЛапы_m0) REFERENCES ТипЛапы; -CREATE INDEX Index801cdef07db8852f60bd68a5a1fc42341cd641fa on Лапа (ТипЛапы_m0); - - ALTER TABLE Лапа ADD CONSTRAINT FKdde6747e278e48578a74941439d3aabb FOREIGN KEY (Кошка_m0) REFERENCES Кошка; -CREATE INDEX Indexd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 on Лапа (Кошка_m0); - - ALTER TABLE Берлога ADD CONSTRAINT FKbba506b76841489b8399936d7bd3dee6 FOREIGN KEY (ЛесРасположения) REFERENCES Лес; -CREATE INDEX Indexa74603e81cb82d318a92d5d3e374895fe242d80e on Берлога (ЛесРасположения); - - ALTER TABLE Берлога ADD CONSTRAINT FK0ab82e8264b54c1caa6aaa19afe02564 FOREIGN KEY (Медведь) REFERENCES Медведь; -CREATE INDEX Index838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 on Берлога (Медведь); - - ALTER TABLE Котенок ADD CONSTRAINT FK5e746611eb774f7488e9e2b6ad0b6a6a FOREIGN KEY (Кошка_m0) REFERENCES Кошка; -CREATE INDEX Index79a0f583830fea7f95d716cc96a27d0967a2d537 on Котенок (Кошка_m0); - - ALTER TABLE Детейл2 ADD CONSTRAINT FK08a6b565f9d44645bc248a3e0be63ca2 FOREIGN KEY (Детейл_m0) REFERENCES Детейл; -CREATE INDEX Indexf07848a075b735870c7821349481da65acdab1ac on Детейл2 (Детейл_m0); - - ALTER TABLE Детейл2 ADD CONSTRAINT FK7644deb6a3644b2083fb521c3a0c1acc FOREIGN KEY (Детейл_m1) REFERENCES ДетейлНаследник; -CREATE INDEX Indexcf374070a402ac74a423ee1902b2348b95969951 on Детейл2 (Детейл_m1); - - ALTER TABLE Журнал ADD CONSTRAINT FK4ed877feb1094fe292e4fa5c1970a3ab FOREIGN KEY (Автор2) REFERENCES Автор; -CREATE INDEX Index51fce8ede8f7716be28b6975505b1f9e738cc71c on Журнал (Автор2); - - ALTER TABLE Журнал ADD CONSTRAINT FK08686fae9b124e03970dac738821388a FOREIGN KEY (Библиотека2) REFERENCES Библиотека; -CREATE INDEX Index93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 on Журнал (Библиотека2); - - ALTER TABLE Кошка ADD CONSTRAINT FKb6d1bff256384e47a701e85305c4b3bd FOREIGN KEY (Порода_m0) REFERENCES Порода; -CREATE INDEX Index271599c8f6730bbff77fe5e9bf61dbfd89e661c6 on Кошка (Порода_m0); - - ALTER TABLE ДетейлНаследник ADD CONSTRAINT FKfd6ed81ae53f48c18104c1d7c416716e FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; -CREATE INDEX Index5f71c50187d44a2fbbee65273ce3d50bdf1e0311 on ДетейлНаследник (БазовыйКласс_m0); - - ALTER TABLE ДетейлНаследник ADD CONSTRAINT FKb26ccd17873c4a2186dabe9e4dc6f838 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; -CREATE INDEX Index4c265a3e468425e25ea55c8344c1110b7cb4bde6 on ДетейлНаследник (БазовыйКласс_m1); - - ALTER TABLE STORMWEBSEARCH ADD CONSTRAINT FKb19599c08b164ff99e7f8b61312b8199 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; - - ALTER TABLE STORMFILTERDETAIL ADD CONSTRAINT FKcb09966a024c41fdb2e4cecdaee24fc6 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; - - ALTER TABLE STORMFILTERLOOKUP ADD CONSTRAINT FK0aa2aea96f9f43ff93cc316246499caa FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; - - ALTER TABLE STORMAuEntity ADD CONSTRAINT FK2948d08746e3459e93996bfb420c290c FOREIGN KEY (ObjectType_m0) REFERENCES STORMAuObjType; - - ALTER TABLE STORMAuField ADD CONSTRAINT FKfc699ad6c15845029a2bb89d37e718ed FOREIGN KEY (MainChange_m0) REFERENCES STORMAuField; - - ALTER TABLE STORMAuField ADD CONSTRAINT FK87a244a89bcb4517964b09114cca49a4 FOREIGN KEY (AuditEntity_m0) REFERENCES STORMAuEntity; - + + + + + +CREATE TABLE LegoPanelAngle ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + Angle INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Driver ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + CarCount INT NULL, + + Documents BOOLEAN NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Страна ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Master ( + + primaryKey UUID NOT NULL, + + property VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Лес ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Площадь INT NULL, + + Заповедник BOOLEAN NULL, + + ДатаПослОсмотра TIMESTAMP(3) NULL, + + Страна UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Son ( + + primaryKey UUID NOT NULL, + + SuspendersColor VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Parent UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ТипПороды ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + ДатаРегистрации TIMESTAMP(3) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Порода ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + ТипПороды_m0 UUID NULL, + + Иерархия_m0 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE TestDetailWithCicle ( + + primaryKey UUID NOT NULL, + + TestDetailName VARCHAR(255) NULL, + + Parent UUID NULL, + + TestMaster UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockCustomPanel ( + + primaryKey UUID NOT NULL, + + Orientation VARCHAR(255) NULL, + + Position VARCHAR(255) NULL, + + PanelAngle UUID NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Daughter ( + + primaryKey UUID NOT NULL, + + DressColor VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Parent UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассСМножТипов ( + + primaryKey UUID NOT NULL, + + PropertyGeography GEOMETRY NULL, + + PropertyEnum VARCHAR(0) NULL, + + PropertyBool BOOLEAN NULL, + + PropertyInt INT NULL, + + PropertyDateTime TIMESTAMP(3) NULL, + + PropertyString VARCHAR(255) NULL, + + PropertyFloat REAL NULL, + + PropertyDouble DOUBLE PRECISION NULL, + + PropertyDecimal DECIMAL NULL, + + PropertySystemNullableDateTime TIMESTAMP(3) NULL, + + PropertySystemNullableInt INT NULL, + + PropertySystemNullableGuid UUID NULL, + + PropertySystemNullableDecimal DECIMAL NULL, + + PropStormnetNullableDateTime TIMESTAMP(3) NULL, + + PropertyStormnetNullableInt INT NULL, + + PropertyStormnetKeyGuid UUID NULL, + + PropStormnetNullableDecimal DECIMAL NULL, + + PropertyStormnetPartliedDate VARCHAR(255) NULL, + + PropertyStormnetContact TEXT NULL, + + PropertyStormnetBlob TEXT NULL, + + PropertyStormnetEvent TEXT NULL, + + PropertyStormnetGeoData TEXT NULL, + + PropertyStormnetImage TEXT NULL, + + PropertyStormnetWebFile TEXT NULL, + + PropertyStormnetFile TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Медведь ( + + primaryKey UUID NOT NULL, + + ПолеБС VARCHAR(255) NULL, + + ПорядковыйНомер INT NULL, + + Вес INT NULL, + + ЦветГлаз VARCHAR(255) NULL, + + Пол VARCHAR(9) NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + CreateTime TIMESTAMP(3) NULL, + + Creator VARCHAR(255) NULL, + + EditTime TIMESTAMP(3) NULL, + + Editor VARCHAR(255) NULL, + + Страна UUID NULL, + + ЛесОбитания UUID NULL, + + Мама UUID NULL, + + Папа UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockColor ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + ColorNumber INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Детейл ( + + primaryKey UUID NOT NULL, + + prop1 INT NULL, + + БазовыйКласс_m0 UUID NULL, + + БазовыйКласс_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ДочернийКласс ( + + primaryKey UUID NOT NULL, + + ChildProperty VARCHAR(255) NULL, + + PropertyGeography GEOMETRY NULL, + + PropertyEnum VARCHAR(0) NULL, + + PropertyBool BOOLEAN NULL, + + PropertyInt INT NULL, + + PropertyDateTime TIMESTAMP(3) NULL, + + PropertyString VARCHAR(255) NULL, + + PropertyFloat REAL NULL, + + PropertyDouble DOUBLE PRECISION NULL, + + PropertyDecimal DECIMAL NULL, + + PropertySystemNullableDateTime TIMESTAMP(3) NULL, + + PropertySystemNullableInt INT NULL, + + PropertySystemNullableGuid UUID NULL, + + PropertySystemNullableDecimal DECIMAL NULL, + + PropStormnetNullableDateTime TIMESTAMP(3) NULL, + + PropertyStormnetNullableInt INT NULL, + + PropertyStormnetKeyGuid UUID NULL, + + PropStormnetNullableDecimal DECIMAL NULL, + + PropertyStormnetPartliedDate VARCHAR(255) NULL, + + PropertyStormnetContact TEXT NULL, + + PropertyStormnetBlob TEXT NULL, + + PropertyStormnetEvent TEXT NULL, + + PropertyStormnetGeoData TEXT NULL, + + PropertyStormnetImage TEXT NULL, + + PropertyStormnetWebFile TEXT NULL, + + PropertyStormnetFile TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Книга ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Автор1 UUID NOT NULL, + + Библиотека1 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlock ( + + primaryKey UUID NOT NULL, + + Width INT NULL, + + Height INT NULL, + + Top INT NULL, + + Configuration VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + BlockId INT NULL, + + Material UUID NULL, + + Color UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Person ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoSocketStandard ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Перелом ( + + primaryKey UUID NOT NULL, + + Дата TIMESTAMP(3) NULL, + + Тип VARCHAR(0) NULL, + + Лапа_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE БазовыйКласс ( + + primaryKey UUID NOT NULL, + + Свойство1 VARCHAR(255) NULL, + + Свойство2 INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ПоставщикКниг ( + + primaryKey UUID NOT NULL, + + Ссылка UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Мастер2 ( + + primaryKey UUID NOT NULL, + + свойство2 INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoDevice ( + + primaryKey UUID NOT NULL, + + Description VARCHAR(255) NULL, + + Electricity BOOLEAN NULL, + + Name VARCHAR(255) NULL, + + BlockId INT NULL, + + Color UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Наследник ( + + primaryKey UUID NOT NULL, + + Свойство DOUBLE PRECISION NULL, + + Свойство1 VARCHAR(255) NULL, + + Свойство2 INT NULL, + + Мастер UUID NULL, + + Master UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Car ( + + primaryKey UUID NOT NULL, + + Number VARCHAR(255) NULL, + + Model VARCHAR(255) NULL, + + TipCar VARCHAR(0) NULL, + + driver UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Мастер ( + + primaryKey UUID NOT NULL, + + prop VARCHAR(255) NULL, + + Мастер2 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Блоха ( + + primaryKey UUID NOT NULL, + + Кличка VARCHAR(255) NULL, + + МедведьОбитания UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoPatent ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + Date TIMESTAMP(3) NULL, + + Authors VARCHAR(255) NULL, + + Description VARCHAR(255) NULL, + + /BaseLegoBlock_m0 UUID NULL, + + /BaseLegoBlock_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Лапа ( + + primaryKey UUID NOT NULL, + + Цвет VARCHAR(255) NULL, + + Размер INT NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + БылиЛиПереломы BOOLEAN NULL, + + Сторона VARCHAR(0) NULL, + + Номер INT NULL, + + РазмерDouble DOUBLE PRECISION NULL, + + РазмерFloat REAL NULL, + + РазмерDecimal DECIMAL NULL, + + ТипЛапы_m0 UUID NULL, + + Кошка_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассСоСтрокКл ( + + StoragePrimaryKey VARCHAR(255) NOT NULL, + + PRIMARY KEY (StoragePrimaryKey)); + + + +CREATE TABLE Берлога ( + + primaryKey UUID NOT NULL, + + ПолеБС VARCHAR(255) NULL, + + Наименование VARCHAR(255) NULL, + + Комфортность INT NULL, + + Заброшена BOOLEAN NULL, + + Сертификат TEXT NULL, + + CertString TEXT NULL, + + ЛесРасположения UUID NULL, + + Медведь UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Автор ( + + primaryKey UUID NOT NULL, + + Имя VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE TestMaster ( + + primaryKey UUID NOT NULL, + + TestMasterName VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Котенок ( + + primaryKey UUID NOT NULL, + + КличкаКотенка VARCHAR(255) NULL, + + Глупость INT NULL, + + Кошка_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Библиотека ( + + primaryKey UUID NOT NULL, + + Адрес VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoMaterial ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockBottomPanel ( + + primaryKey UUID NOT NULL, + + WidthCount INT NULL, + + HeightCount INT NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockTopPanelHole ( + + primaryKey UUID NOT NULL, + + Position VARCHAR(255) NULL, + + TopPanel UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Детейл2 ( + + primaryKey UUID NOT NULL, + + prop2 VARCHAR(255) NULL, + + Детейл_m0 UUID NULL, + + Детейл_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Журнал ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Номер INT NULL, + + Автор2 UUID NOT NULL, + + Библиотека2 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockTopPanel ( + + primaryKey UUID NOT NULL, + + WidthCount INT NULL, + + HeightCount INT NULL, + + SocketStandard UUID NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ТипЛапы ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Актуально BOOLEAN NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассStoredDerived ( + + primaryKey UUID NOT NULL, + + StrAttr2 VARCHAR(255) NULL, + + StrAttr VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Кошка ( + + primaryKey UUID NOT NULL, + + Кличка VARCHAR(255) NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + Тип VARCHAR(0) NULL, + + ПородаСтрокой VARCHAR(255) NULL, + + Агрессивная BOOLEAN NULL, + + УсыСлева INT NULL, + + УсыСправа INT NULL, + + Порода_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ДетейлНаследник ( + + primaryKey UUID NOT NULL, + + prop3 VARCHAR(255) NULL, + + prop1 INT NULL, + + БазовыйКласс_m0 UUID NULL, + + БазовыйКласс_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMNETLOCKDATA ( + + LockKey VARCHAR(300) NOT NULL, + + UserName VARCHAR(300) NOT NULL, + + LockDate TIMESTAMP(3) NULL, + + PRIMARY KEY (LockKey)); + + + +CREATE TABLE STORMSETTINGS ( + + primaryKey UUID NOT NULL, + + Module VARCHAR(1000) NULL, + + Name VARCHAR(255) NULL, + + Value TEXT NULL, + + "User" VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAdvLimit ( + + primaryKey UUID NOT NULL, + + "User" VARCHAR(255) NULL, + + Published BOOLEAN NULL, + + Module VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Value TEXT NULL, + + HotKeyData INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERSETTING ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + DataObjectView VARCHAR(255) NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMWEBSEARCH ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + "Order" INT NOT NULL, + + PresentView VARCHAR(255) NOT NULL, + + DetailedView VARCHAR(255) NOT NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERDETAIL ( + + primaryKey UUID NOT NULL, + + Caption VARCHAR(255) NOT NULL, + + DataObjectView VARCHAR(255) NOT NULL, + + ConnectMasterProp VARCHAR(255) NOT NULL, + + OwnerConnectProp VARCHAR(255) NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERLOOKUP ( + + primaryKey UUID NOT NULL, + + DataObjectType VARCHAR(255) NOT NULL, + + Container VARCHAR(255) NULL, + + ContainerTag VARCHAR(255) NULL, + + FieldsToView VARCHAR(255) NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE UserSetting ( + + primaryKey UUID NOT NULL, + + AppName VARCHAR(256) NULL, + + UserName VARCHAR(512) NULL, + + UserGuid UUID NULL, + + ModuleName VARCHAR(1024) NULL, + + ModuleGuid UUID NULL, + + SettName VARCHAR(256) NULL, + + SettGuid UUID NULL, + + SettLastAccessTime TIMESTAMP(3) NULL, + + StrVal VARCHAR(256) NULL, + + TxtVal TEXT NULL, + + IntVal INT NULL, + + BoolVal BOOLEAN NULL, + + GuidVal UUID NULL, + + DecimalVal DECIMAL(20,10) NULL, + + DateTimeVal TIMESTAMP(3) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ApplicationLog ( + + primaryKey UUID NOT NULL, + + Category VARCHAR(64) NULL, + + EventId INT NULL, + + Priority INT NULL, + + Severity VARCHAR(32) NULL, + + Title VARCHAR(256) NULL, + + Timestamp TIMESTAMP(3) NULL, + + MachineName VARCHAR(32) NULL, + + AppDomainName VARCHAR(512) NULL, + + ProcessId VARCHAR(256) NULL, + + ProcessName VARCHAR(512) NULL, + + ThreadName VARCHAR(512) NULL, + + Win32ThreadId VARCHAR(128) NULL, + + Message VARCHAR(2500) NULL, + + FormattedMessage TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuObjType ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuEntity ( + + primaryKey UUID NOT NULL, + + ObjectPrimaryKey VARCHAR(38) NOT NULL, + + OperationTime TIMESTAMP(3) NOT NULL, + + OperationType VARCHAR(100) NOT NULL, + + ExecutionResult VARCHAR(12) NOT NULL, + + Source VARCHAR(255) NOT NULL, + + SerializedField TEXT NULL, + + User_m0 UUID NOT NULL, + + ObjectType_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuField ( + + primaryKey UUID NOT NULL, + + Field VARCHAR(100) NOT NULL, + + OldValue TEXT NULL, + + NewValue TEXT NULL, + + MainChange_m0 UUID NULL, + + AuditEntity_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + + + ALTER TABLE Лес ADD CONSTRAINT FKd3bd1222072f531605e73e66656fe58296c8bfd2 FOREIGN KEY (Страна) REFERENCES Страна; +CREATE INDEX Indexd3bd1222072f531605e73e66656fe58296c8bfd2 on Лес (Страна); + + ALTER TABLE Son ADD CONSTRAINT FKdabfac99e0885f846c9da12b79c4cbd7894842d3 FOREIGN KEY (Parent) REFERENCES Person; +CREATE INDEX Indexdabfac99e0885f846c9da12b79c4cbd7894842d3 on Son (Parent); + + ALTER TABLE Порода ADD CONSTRAINT FK2b114b4677a6ea52b53a26c9a20bbaad606eff78 FOREIGN KEY (ТипПороды_m0) REFERENCES ТипПороды; +CREATE INDEX Index2b114b4677a6ea52b53a26c9a20bbaad606eff78 on Порода (ТипПороды_m0); + + ALTER TABLE Порода ADD CONSTRAINT FK14420958a87702decd2090afa109ad90292eb458 FOREIGN KEY (Иерархия_m0) REFERENCES Порода; +CREATE INDEX Index14420958a87702decd2090afa109ad90292eb458 on Порода (Иерархия_m0); + + ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK04dbb0ac2005483472591018ab7522c499fe5b38 FOREIGN KEY (Parent) REFERENCES TestDetailWithCicle; +CREATE INDEX Index04dbb0ac2005483472591018ab7522c499fe5b38 on TestDetailWithCicle (Parent); + + ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FKf8067bbec7353839c222df5b7aeba4ce65c1655f FOREIGN KEY (TestMaster) REFERENCES TestMaster; +CREATE INDEX Indexf8067bbec7353839c222df5b7aeba4ce65c1655f on TestDetailWithCicle (TestMaster); + + ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FK53e2141b982788b2970c50d23073a5847e47d81c FOREIGN KEY (PanelAngle) REFERENCES LegoPanelAngle; +CREATE INDEX Index53e2141b982788b2970c50d23073a5847e47d81c on LegoBlockCustomPanel (PanelAngle); + + ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FKff526da3c540c5b99c203d0d93050c62ed29505f FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexff526da3c540c5b99c203d0d93050c62ed29505f on LegoBlockCustomPanel (Block); + + ALTER TABLE Daughter ADD CONSTRAINT FK743208308d3826e12250804dbe77e02601e27402 FOREIGN KEY (Parent) REFERENCES Person; +CREATE INDEX Index743208308d3826e12250804dbe77e02601e27402 on Daughter (Parent); +CREATE INDEX Indexc5f9d71c0704ea7b966afcfdc89dc7eabe2d0c43 on КлассСМножТипов USING gist (PropertyGeography); + + ALTER TABLE Медведь ADD CONSTRAINT FK6d8033494746b0bb87ba367c83d273dfa11b8f59 FOREIGN KEY (Страна) REFERENCES Страна; +CREATE INDEX Index6d8033494746b0bb87ba367c83d273dfa11b8f59 on Медведь (Страна); + + ALTER TABLE Медведь ADD CONSTRAINT FK93be01a32cae64dc4b18705ade6683f41a32c367 FOREIGN KEY (ЛесОбитания) REFERENCES Лес; +CREATE INDEX Index93be01a32cae64dc4b18705ade6683f41a32c367 on Медведь (ЛесОбитания); + + ALTER TABLE Медведь ADD CONSTRAINT FK0b9f6ad0caded1971696ef6602e8a2831fa941b1 FOREIGN KEY (Мама) REFERENCES Медведь; +CREATE INDEX Index0b9f6ad0caded1971696ef6602e8a2831fa941b1 on Медведь (Мама); + + ALTER TABLE Медведь ADD CONSTRAINT FK0ca403a899ac5a709a19bbb9ada47b0060e5b819 FOREIGN KEY (Папа) REFERENCES Медведь; +CREATE INDEX Index0ca403a899ac5a709a19bbb9ada47b0060e5b819 on Медведь (Папа); + + ALTER TABLE Детейл ADD CONSTRAINT FKffdec7cb63189ed3e206c50c005f7daa0fe24f75 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; +CREATE INDEX Indexffdec7cb63189ed3e206c50c005f7daa0fe24f75 on Детейл (БазовыйКласс_m0); + + ALTER TABLE Детейл ADD CONSTRAINT FKafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; +CREATE INDEX Indexafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc on Детейл (БазовыйКласс_m1); +CREATE INDEX Index10d981ac5288ea278311b6a711b43fa954b635a8 on ДочернийКласс USING gist (PropertyGeography); + + ALTER TABLE Книга ADD CONSTRAINT FK899896abd3f04413fb054cc8507b69f51489a8bc FOREIGN KEY (Автор1) REFERENCES Автор; +CREATE INDEX Index899896abd3f04413fb054cc8507b69f51489a8bc on Книга (Автор1); + + ALTER TABLE Книга ADD CONSTRAINT FK84e4d9d5b6adc4bec48541216f15f396dd2b602c FOREIGN KEY (Библиотека1) REFERENCES Библиотека; +CREATE INDEX Index84e4d9d5b6adc4bec48541216f15f396dd2b602c on Книга (Библиотека1); + + ALTER TABLE LegoBlock ADD CONSTRAINT FK4cfb6296b76f57183c4e2ee17b66be5bed463d0f FOREIGN KEY (Material) REFERENCES LegoMaterial; +CREATE INDEX Index4cfb6296b76f57183c4e2ee17b66be5bed463d0f on LegoBlock (Material); + + ALTER TABLE LegoBlock ADD CONSTRAINT FK9f2f5e18e6674969f5e82da37bf4b5a2a1d4713a FOREIGN KEY (Color) REFERENCES LegoBlockColor; +CREATE INDEX Index9f2f5e18e6674969f5e82da37bf4b5a2a1d4713a on LegoBlock (Color); + + ALTER TABLE Перелом ADD CONSTRAINT FK6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa FOREIGN KEY (Лапа_m0) REFERENCES Лапа; +CREATE INDEX Index6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa on Перелом (Лапа_m0); + + ALTER TABLE LegoDevice ADD CONSTRAINT FKafee67e1a41c2550c0f3df3724edf1b0be74db9f FOREIGN KEY (Color) REFERENCES LegoBlockColor; +CREATE INDEX Indexafee67e1a41c2550c0f3df3724edf1b0be74db9f on LegoDevice (Color); + + ALTER TABLE Наследник ADD CONSTRAINT FK28ac1d61524a43a59e67af57a855ad487d1f8141 FOREIGN KEY (Мастер) REFERENCES Мастер; +CREATE INDEX Index28ac1d61524a43a59e67af57a855ad487d1f8141 on Наследник (Мастер); + + ALTER TABLE Наследник ADD CONSTRAINT FK0cb9ac2b0e7896223ed63c0c888c23aa86682b1e FOREIGN KEY (Master) REFERENCES Master; +CREATE INDEX Index0cb9ac2b0e7896223ed63c0c888c23aa86682b1e on Наследник (Master); + + ALTER TABLE Car ADD CONSTRAINT FKe86a1d047f4df342bf39a5af864aec2b40a3547a FOREIGN KEY (driver) REFERENCES Driver; +CREATE INDEX Indexe86a1d047f4df342bf39a5af864aec2b40a3547a on Car (driver); + + ALTER TABLE Мастер ADD CONSTRAINT FK0053148ab4597a6e8d749a7201b40246de6bba66 FOREIGN KEY (Мастер2) REFERENCES Мастер2; +CREATE INDEX Index0053148ab4597a6e8d749a7201b40246de6bba66 on Мастер (Мастер2); + + ALTER TABLE Блоха ADD CONSTRAINT FKb43131b348ee335105dd990a690720791b5dcba6 FOREIGN KEY (МедведьОбитания) REFERENCES Медведь; +CREATE INDEX Indexb43131b348ee335105dd990a690720791b5dcba6 on Блоха (МедведьОбитания); + + ALTER TABLE LegoPatent ADD CONSTRAINT FKe371de37f3b3ea04227552de1ee882c38df3f428 FOREIGN KEY (/BaseLegoBlock_m0) REFERENCES LegoBlock; +CREATE INDEX Indexe371de37f3b3ea04227552de1ee882c38df3f428 on LegoPatent (/BaseLegoBlock_m0); + + ALTER TABLE LegoPatent ADD CONSTRAINT FK2094cdf96c723881d619e851a1ab2d56ade718af FOREIGN KEY (/BaseLegoBlock_m1) REFERENCES LegoDevice; +CREATE INDEX Index2094cdf96c723881d619e851a1ab2d56ade718af on LegoPatent (/BaseLegoBlock_m1); + + ALTER TABLE Лапа ADD CONSTRAINT FK801cdef07db8852f60bd68a5a1fc42341cd641fa FOREIGN KEY (ТипЛапы_m0) REFERENCES ТипЛапы; +CREATE INDEX Index801cdef07db8852f60bd68a5a1fc42341cd641fa on Лапа (ТипЛапы_m0); + + ALTER TABLE Лапа ADD CONSTRAINT FKd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; +CREATE INDEX Indexd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 on Лапа (Кошка_m0); + + ALTER TABLE Берлога ADD CONSTRAINT FKa74603e81cb82d318a92d5d3e374895fe242d80e FOREIGN KEY (ЛесРасположения) REFERENCES Лес; +CREATE INDEX Indexa74603e81cb82d318a92d5d3e374895fe242d80e on Берлога (ЛесРасположения); + + ALTER TABLE Берлога ADD CONSTRAINT FK838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 FOREIGN KEY (Медведь) REFERENCES Медведь; +CREATE INDEX Index838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 on Берлога (Медведь); + + ALTER TABLE Котенок ADD CONSTRAINT FK79a0f583830fea7f95d716cc96a27d0967a2d537 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; +CREATE INDEX Index79a0f583830fea7f95d716cc96a27d0967a2d537 on Котенок (Кошка_m0); + + ALTER TABLE LegoBlockBottomPanel ADD CONSTRAINT FKba0e912f138a900a9d416b459d0b38e70871f043 FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexba0e912f138a900a9d416b459d0b38e70871f043 on LegoBlockBottomPanel (Block); + + ALTER TABLE LegoBlockTopPanelHole ADD CONSTRAINT FKdeb8814715bfe1e7ac2e15c7346e05312d5a6a61 FOREIGN KEY (TopPanel) REFERENCES LegoBlockTopPanel; +CREATE INDEX Indexdeb8814715bfe1e7ac2e15c7346e05312d5a6a61 on LegoBlockTopPanelHole (TopPanel); + + ALTER TABLE Детейл2 ADD CONSTRAINT FKf07848a075b735870c7821349481da65acdab1ac FOREIGN KEY (Детейл_m0) REFERENCES Детейл; +CREATE INDEX Indexf07848a075b735870c7821349481da65acdab1ac on Детейл2 (Детейл_m0); + + ALTER TABLE Детейл2 ADD CONSTRAINT FKcf374070a402ac74a423ee1902b2348b95969951 FOREIGN KEY (Детейл_m1) REFERENCES ДетейлНаследник; +CREATE INDEX Indexcf374070a402ac74a423ee1902b2348b95969951 on Детейл2 (Детейл_m1); + + ALTER TABLE Журнал ADD CONSTRAINT FK51fce8ede8f7716be28b6975505b1f9e738cc71c FOREIGN KEY (Автор2) REFERENCES Автор; +CREATE INDEX Index51fce8ede8f7716be28b6975505b1f9e738cc71c on Журнал (Автор2); + + ALTER TABLE Журнал ADD CONSTRAINT FK93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 FOREIGN KEY (Библиотека2) REFERENCES Библиотека; +CREATE INDEX Index93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 on Журнал (Библиотека2); + + ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FK49d972c58446da0e86dfc1da2b8f54a4df9a37d0 FOREIGN KEY (SocketStandard) REFERENCES LegoSocketStandard; +CREATE INDEX Index49d972c58446da0e86dfc1da2b8f54a4df9a37d0 on LegoBlockTopPanel (SocketStandard); + + ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FKa1f8021b49abe4367a71a7f42c5e578c3326580a FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexa1f8021b49abe4367a71a7f42c5e578c3326580a on LegoBlockTopPanel (Block); + + ALTER TABLE Кошка ADD CONSTRAINT FK271599c8f6730bbff77fe5e9bf61dbfd89e661c6 FOREIGN KEY (Порода_m0) REFERENCES Порода; +CREATE INDEX Index271599c8f6730bbff77fe5e9bf61dbfd89e661c6 on Кошка (Порода_m0); + + ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK5f71c50187d44a2fbbee65273ce3d50bdf1e0311 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; +CREATE INDEX Index5f71c50187d44a2fbbee65273ce3d50bdf1e0311 on ДетейлНаследник (БазовыйКласс_m0); + + ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK4c265a3e468425e25ea55c8344c1110b7cb4bde6 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; +CREATE INDEX Index4c265a3e468425e25ea55c8344c1110b7cb4bde6 on ДетейлНаследник (БазовыйКласс_m1); + + ALTER TABLE STORMWEBSEARCH ADD CONSTRAINT FKc4378e39870eb056aec84088683297a01d2a6200 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; + + ALTER TABLE STORMFILTERDETAIL ADD CONSTRAINT FK921d16269835017e2a0d0e29ad6fb175454a70d0 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; + + ALTER TABLE STORMFILTERLOOKUP ADD CONSTRAINT FKce38ef0db3f01a53acaa49fed8853fb941ad47ba FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; +CREATE INDEX Indexaa1a3fec50499d204c389473163d0d8f55d4aed9 on STORMAuEntity (ObjectPrimaryKey); +CREATE INDEX Indexaa1a3fec50499d204c389473163d0d8f55d4aed9 on STORMAuEntity (upper(ObjectPrimaryKey)); +CREATE INDEX Index969964c4b120bd7eebed319d77e182a5adf20816 on STORMAuEntity (OperationTime); +CREATE INDEX Index44feded66c1cee358e0db313bcaa06e5f8d8e549 on STORMAuEntity (User_m0); + + ALTER TABLE STORMAuEntity ADD CONSTRAINT FKb5725f55e665c6b660aff02c558b5ba413523eaa FOREIGN KEY (ObjectType_m0) REFERENCES STORMAuObjType; +CREATE INDEX Indexb5725f55e665c6b660aff02c558b5ba413523eaa on STORMAuEntity (ObjectType_m0); + + ALTER TABLE STORMAuField ADD CONSTRAINT FKf2cc121c707b1bf4290f2bb625d1d112b4919288 FOREIGN KEY (MainChange_m0) REFERENCES STORMAuField; + + ALTER TABLE STORMAuField ADD CONSTRAINT FK680dbb7e20a2404a7439d4de2d06d669f165bafe FOREIGN KEY (AuditEntity_m0) REFERENCES STORMAuEntity; +CREATE INDEX Index680dbb7e20a2404a7439d4de2d06d669f165bafe on STORMAuField (AuditEntity_m0); + diff --git a/Tests/Objects/BaseLegoBlock.cs b/Tests/Objects/BaseLegoBlock.cs new file mode 100644 index 00000000..9323166f --- /dev/null +++ b/Tests/Objects/BaseLegoBlock.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// BaseLegoBlock. + /// + // *** Start programmer edit section *** (BaseLegoBlock CustomAttributes) + + // *** End programmer edit section *** (BaseLegoBlock CustomAttributes) + [AutoAltered()] + [ICSSoft.STORMNET.NotStored()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class BaseLegoBlock : ICSSoft.STORMNET.DataObject + { + + private string fName; + + private int fBlockId; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockColor fColor; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent fPatents; + + // *** Start programmer edit section *** (BaseLegoBlock CustomMembers) + + // *** End programmer edit section *** (BaseLegoBlock CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (BaseLegoBlock.Name CustomAttributes) + + // *** End programmer edit section *** (BaseLegoBlock.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (BaseLegoBlock.Name Get start) + + // *** End programmer edit section *** (BaseLegoBlock.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (BaseLegoBlock.Name Get end) + + // *** End programmer edit section *** (BaseLegoBlock.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (BaseLegoBlock.Name Set start) + + // *** End programmer edit section *** (BaseLegoBlock.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (BaseLegoBlock.Name Set end) + + // *** End programmer edit section *** (BaseLegoBlock.Name Set end) + } + } + + /// + /// BlockId. + /// + // *** Start programmer edit section *** (BaseLegoBlock.BlockId CustomAttributes) + + // *** End programmer edit section *** (BaseLegoBlock.BlockId CustomAttributes) + public virtual int BlockId + { + get + { + // *** Start programmer edit section *** (BaseLegoBlock.BlockId Get start) + + // *** End programmer edit section *** (BaseLegoBlock.BlockId Get start) + int result = this.fBlockId; + // *** Start programmer edit section *** (BaseLegoBlock.BlockId Get end) + + // *** End programmer edit section *** (BaseLegoBlock.BlockId Get end) + return result; + } + set + { + // *** Start programmer edit section *** (BaseLegoBlock.BlockId Set start) + + // *** End programmer edit section *** (BaseLegoBlock.BlockId Set start) + this.fBlockId = value; + // *** Start programmer edit section *** (BaseLegoBlock.BlockId Set end) + + // *** End programmer edit section *** (BaseLegoBlock.BlockId Set end) + } + } + + /// + /// BaseLegoBlock. + /// + // *** Start programmer edit section *** (BaseLegoBlock.Color CustomAttributes) + + // *** End programmer edit section *** (BaseLegoBlock.Color CustomAttributes) + [PropertyStorage(new string[] { + "Color"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockColor Color + { + get + { + // *** Start programmer edit section *** (BaseLegoBlock.Color Get start) + + // *** End programmer edit section *** (BaseLegoBlock.Color Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockColor result = this.fColor; + // *** Start programmer edit section *** (BaseLegoBlock.Color Get end) + + // *** End programmer edit section *** (BaseLegoBlock.Color Get end) + return result; + } + set + { + // *** Start programmer edit section *** (BaseLegoBlock.Color Set start) + + // *** End programmer edit section *** (BaseLegoBlock.Color Set start) + this.fColor = value; + // *** Start programmer edit section *** (BaseLegoBlock.Color Set end) + + // *** End programmer edit section *** (BaseLegoBlock.Color Set end) + } + } + + /// + /// BaseLegoBlock. + /// + // *** Start programmer edit section *** (BaseLegoBlock.Patents CustomAttributes) + + // *** End programmer edit section *** (BaseLegoBlock.Patents CustomAttributes) + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent Patents + { + get + { + // *** Start programmer edit section *** (BaseLegoBlock.Patents Get start) + + // *** End programmer edit section *** (BaseLegoBlock.Patents Get start) + if ((this.fPatents == null)) + { + this.fPatents = new NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent(this); + } + NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent result = this.fPatents; + // *** Start programmer edit section *** (BaseLegoBlock.Patents Get end) + + // *** End programmer edit section *** (BaseLegoBlock.Patents Get end) + return result; + } + set + { + // *** Start programmer edit section *** (BaseLegoBlock.Patents Set start) + + // *** End programmer edit section *** (BaseLegoBlock.Patents Set start) + this.fPatents = value; + // *** Start programmer edit section *** (BaseLegoBlock.Patents Set end) + + // *** End programmer edit section *** (BaseLegoBlock.Patents Set end) + } + } + } +} diff --git a/Tests/Objects/LegoBlock.cs b/Tests/Objects/LegoBlock.cs new file mode 100644 index 00000000..48d74c03 --- /dev/null +++ b/Tests/Objects/LegoBlock.cs @@ -0,0 +1,320 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlock CustomAttributes) + + // *** End programmer edit section *** (LegoBlock CustomAttributes) + [PublishName("LegoBlock")] + [AutoAltered()] + [ICSSoft.STORMNET.NotStored(false)] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlock : NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock + { + + private int fWidth; + + private int fHeight; + + private int fTop; + + private string fConfiguration; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoMaterial fMaterial; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel fCustomPanels; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel fTopPanels; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel fBottomPanels; + + // *** Start programmer edit section *** (LegoBlock CustomMembers) + + // *** End programmer edit section *** (LegoBlock CustomMembers) + + + /// + /// Width. + /// + // *** Start programmer edit section *** (LegoBlock.Width CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.Width CustomAttributes) + public virtual int Width + { + get + { + // *** Start programmer edit section *** (LegoBlock.Width Get start) + + // *** End programmer edit section *** (LegoBlock.Width Get start) + int result = this.fWidth; + // *** Start programmer edit section *** (LegoBlock.Width Get end) + + // *** End programmer edit section *** (LegoBlock.Width Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.Width Set start) + + // *** End programmer edit section *** (LegoBlock.Width Set start) + this.fWidth = value; + // *** Start programmer edit section *** (LegoBlock.Width Set end) + + // *** End programmer edit section *** (LegoBlock.Width Set end) + } + } + + /// + /// Height. + /// + // *** Start programmer edit section *** (LegoBlock.Height CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.Height CustomAttributes) + public virtual int Height + { + get + { + // *** Start programmer edit section *** (LegoBlock.Height Get start) + + // *** End programmer edit section *** (LegoBlock.Height Get start) + int result = this.fHeight; + // *** Start programmer edit section *** (LegoBlock.Height Get end) + + // *** End programmer edit section *** (LegoBlock.Height Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.Height Set start) + + // *** End programmer edit section *** (LegoBlock.Height Set start) + this.fHeight = value; + // *** Start programmer edit section *** (LegoBlock.Height Set end) + + // *** End programmer edit section *** (LegoBlock.Height Set end) + } + } + + /// + /// Top. + /// + // *** Start programmer edit section *** (LegoBlock.Top CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.Top CustomAttributes) + public virtual int Top + { + get + { + // *** Start programmer edit section *** (LegoBlock.Top Get start) + + // *** End programmer edit section *** (LegoBlock.Top Get start) + int result = this.fTop; + // *** Start programmer edit section *** (LegoBlock.Top Get end) + + // *** End programmer edit section *** (LegoBlock.Top Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.Top Set start) + + // *** End programmer edit section *** (LegoBlock.Top Set start) + this.fTop = value; + // *** Start programmer edit section *** (LegoBlock.Top Set end) + + // *** End programmer edit section *** (LegoBlock.Top Set end) + } + } + + /// + /// Configuration. + /// + // *** Start programmer edit section *** (LegoBlock.Configuration CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.Configuration CustomAttributes) + [StrLen(255)] + public virtual string Configuration + { + get + { + // *** Start programmer edit section *** (LegoBlock.Configuration Get start) + + // *** End programmer edit section *** (LegoBlock.Configuration Get start) + string result = this.fConfiguration; + // *** Start programmer edit section *** (LegoBlock.Configuration Get end) + + // *** End programmer edit section *** (LegoBlock.Configuration Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.Configuration Set start) + + // *** End programmer edit section *** (LegoBlock.Configuration Set start) + this.fConfiguration = value; + // *** Start programmer edit section *** (LegoBlock.Configuration Set end) + + // *** End programmer edit section *** (LegoBlock.Configuration Set end) + } + } + + /// + /// LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlock.Material CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.Material CustomAttributes) + [PropertyStorage(new string[] { + "Material"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoMaterial Material + { + get + { + // *** Start programmer edit section *** (LegoBlock.Material Get start) + + // *** End programmer edit section *** (LegoBlock.Material Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoMaterial result = this.fMaterial; + // *** Start programmer edit section *** (LegoBlock.Material Get end) + + // *** End programmer edit section *** (LegoBlock.Material Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.Material Set start) + + // *** End programmer edit section *** (LegoBlock.Material Set start) + this.fMaterial = value; + // *** Start programmer edit section *** (LegoBlock.Material Set end) + + // *** End programmer edit section *** (LegoBlock.Material Set end) + } + } + + /// + /// LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlock.CustomPanels CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.CustomPanels CustomAttributes) + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel CustomPanels + { + get + { + // *** Start programmer edit section *** (LegoBlock.CustomPanels Get start) + + // *** End programmer edit section *** (LegoBlock.CustomPanels Get start) + if ((this.fCustomPanels == null)) + { + this.fCustomPanels = new NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel(this); + } + NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel result = this.fCustomPanels; + // *** Start programmer edit section *** (LegoBlock.CustomPanels Get end) + + // *** End programmer edit section *** (LegoBlock.CustomPanels Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.CustomPanels Set start) + + // *** End programmer edit section *** (LegoBlock.CustomPanels Set start) + this.fCustomPanels = value; + // *** Start programmer edit section *** (LegoBlock.CustomPanels Set end) + + // *** End programmer edit section *** (LegoBlock.CustomPanels Set end) + } + } + + /// + /// LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlock.TopPanels CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.TopPanels CustomAttributes) + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel TopPanels + { + get + { + // *** Start programmer edit section *** (LegoBlock.TopPanels Get start) + + // *** End programmer edit section *** (LegoBlock.TopPanels Get start) + if ((this.fTopPanels == null)) + { + this.fTopPanels = new NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel(this); + } + NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel result = this.fTopPanels; + // *** Start programmer edit section *** (LegoBlock.TopPanels Get end) + + // *** End programmer edit section *** (LegoBlock.TopPanels Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.TopPanels Set start) + + // *** End programmer edit section *** (LegoBlock.TopPanels Set start) + this.fTopPanels = value; + // *** Start programmer edit section *** (LegoBlock.TopPanels Set end) + + // *** End programmer edit section *** (LegoBlock.TopPanels Set end) + } + } + + /// + /// LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlock.BottomPanels CustomAttributes) + + // *** End programmer edit section *** (LegoBlock.BottomPanels CustomAttributes) + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel BottomPanels + { + get + { + // *** Start programmer edit section *** (LegoBlock.BottomPanels Get start) + + // *** End programmer edit section *** (LegoBlock.BottomPanels Get start) + if ((this.fBottomPanels == null)) + { + this.fBottomPanels = new NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel(this); + } + NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel result = this.fBottomPanels; + // *** Start programmer edit section *** (LegoBlock.BottomPanels Get end) + + // *** End programmer edit section *** (LegoBlock.BottomPanels Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlock.BottomPanels Set start) + + // *** End programmer edit section *** (LegoBlock.BottomPanels Set start) + this.fBottomPanels = value; + // *** Start programmer edit section *** (LegoBlock.BottomPanels Set end) + + // *** End programmer edit section *** (LegoBlock.BottomPanels Set end) + } + } + } +} diff --git a/Tests/Objects/LegoBlockBottomPanel.cs b/Tests/Objects/LegoBlockBottomPanel.cs new file mode 100644 index 00000000..88f2bc9f --- /dev/null +++ b/Tests/Objects/LegoBlockBottomPanel.cs @@ -0,0 +1,185 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlockBottomPanel. + /// + // *** Start programmer edit section *** (LegoBlockBottomPanel CustomAttributes) + + // *** End programmer edit section *** (LegoBlockBottomPanel CustomAttributes) + [PublishName("LegoBlockBottomPanel")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlockBottomPanel : ICSSoft.STORMNET.DataObject + { + + private int fWidthCount; + + private int fHeightCount; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fBlock; + + // *** Start programmer edit section *** (LegoBlockBottomPanel CustomMembers) + + // *** End programmer edit section *** (LegoBlockBottomPanel CustomMembers) + + + /// + /// WidthCount. + /// + // *** Start programmer edit section *** (LegoBlockBottomPanel.WidthCount CustomAttributes) + + // *** End programmer edit section *** (LegoBlockBottomPanel.WidthCount CustomAttributes) + public virtual int WidthCount + { + get + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.WidthCount Get start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.WidthCount Get start) + int result = this.fWidthCount; + // *** Start programmer edit section *** (LegoBlockBottomPanel.WidthCount Get end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.WidthCount Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.WidthCount Set start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.WidthCount Set start) + this.fWidthCount = value; + // *** Start programmer edit section *** (LegoBlockBottomPanel.WidthCount Set end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.WidthCount Set end) + } + } + + /// + /// HeightCount. + /// + // *** Start programmer edit section *** (LegoBlockBottomPanel.HeightCount CustomAttributes) + + // *** End programmer edit section *** (LegoBlockBottomPanel.HeightCount CustomAttributes) + public virtual int HeightCount + { + get + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.HeightCount Get start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.HeightCount Get start) + int result = this.fHeightCount; + // *** Start programmer edit section *** (LegoBlockBottomPanel.HeightCount Get end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.HeightCount Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.HeightCount Set start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.HeightCount Set start) + this.fHeightCount = value; + // *** Start programmer edit section *** (LegoBlockBottomPanel.HeightCount Set end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.HeightCount Set end) + } + } + + /// + /// мастеровая ссылка на шапку NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlockBottomPanel.Block CustomAttributes) + + // *** End programmer edit section *** (LegoBlockBottomPanel.Block CustomAttributes) + [Agregator()] + [NotNull()] + [PropertyStorage(new string[] { + "Block"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock Block + { + get + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.Block Get start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.Block Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock result = this.fBlock; + // *** Start programmer edit section *** (LegoBlockBottomPanel.Block Get end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.Block Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockBottomPanel.Block Set start) + + // *** End programmer edit section *** (LegoBlockBottomPanel.Block Set start) + this.fBlock = value; + // *** Start programmer edit section *** (LegoBlockBottomPanel.Block Set end) + + // *** End programmer edit section *** (LegoBlockBottomPanel.Block Set end) + } + } + } + + /// + /// Detail array of LegoBlockBottomPanel. + /// + // *** Start programmer edit section *** (DetailArrayDetailArrayOfLegoBlockBottomPanel CustomAttributes) + + // *** End programmer edit section *** (DetailArrayDetailArrayOfLegoBlockBottomPanel CustomAttributes) + public class DetailArrayOfLegoBlockBottomPanel : ICSSoft.STORMNET.DetailArray + { + + // *** Start programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel members) + + // *** End programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockBottomPanel members) + + + /// + /// Construct detail array. + /// + /// + /// Returns object with type LegoBlockBottomPanel by index. + /// + /// + /// Adds object with type LegoBlockBottomPanel. + /// + public DetailArrayOfLegoBlockBottomPanel(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fLegoBlock) : + base(typeof(LegoBlockBottomPanel), ((ICSSoft.STORMNET.DataObject)(fLegoBlock))) + { + } + + public NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockBottomPanel this[int index] + { + get + { + return ((NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockBottomPanel)(this.ItemByIndex(index))); + } + } + + public virtual void Add(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockBottomPanel dataobject) + { + this.AddObject(((ICSSoft.STORMNET.DataObject)(dataobject))); + } + } +} diff --git a/Tests/Objects/LegoBlockColor.cs b/Tests/Objects/LegoBlockColor.cs new file mode 100644 index 00000000..0d68ee98 --- /dev/null +++ b/Tests/Objects/LegoBlockColor.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlockColor. + /// + // *** Start programmer edit section *** (LegoBlockColor CustomAttributes) + + // *** End programmer edit section *** (LegoBlockColor CustomAttributes) + [PublishName("LegoBlockColor")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlockColor : ICSSoft.STORMNET.DataObject + { + + private string fName; + + private int fColorNumber; + + // *** Start programmer edit section *** (LegoBlockColor CustomMembers) + + // *** End programmer edit section *** (LegoBlockColor CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (LegoBlockColor.Name CustomAttributes) + + // *** End programmer edit section *** (LegoBlockColor.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (LegoBlockColor.Name Get start) + + // *** End programmer edit section *** (LegoBlockColor.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (LegoBlockColor.Name Get end) + + // *** End programmer edit section *** (LegoBlockColor.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockColor.Name Set start) + + // *** End programmer edit section *** (LegoBlockColor.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (LegoBlockColor.Name Set end) + + // *** End programmer edit section *** (LegoBlockColor.Name Set end) + } + } + + /// + /// ColorNumber. + /// + // *** Start programmer edit section *** (LegoBlockColor.ColorNumber CustomAttributes) + + // *** End programmer edit section *** (LegoBlockColor.ColorNumber CustomAttributes) + public virtual int ColorNumber + { + get + { + // *** Start programmer edit section *** (LegoBlockColor.ColorNumber Get start) + + // *** End programmer edit section *** (LegoBlockColor.ColorNumber Get start) + int result = this.fColorNumber; + // *** Start programmer edit section *** (LegoBlockColor.ColorNumber Get end) + + // *** End programmer edit section *** (LegoBlockColor.ColorNumber Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockColor.ColorNumber Set start) + + // *** End programmer edit section *** (LegoBlockColor.ColorNumber Set start) + this.fColorNumber = value; + // *** Start programmer edit section *** (LegoBlockColor.ColorNumber Set end) + + // *** End programmer edit section *** (LegoBlockColor.ColorNumber Set end) + } + } + } +} diff --git a/Tests/Objects/LegoBlockCustomPanel.cs b/Tests/Objects/LegoBlockCustomPanel.cs new file mode 100644 index 00000000..c5814248 --- /dev/null +++ b/Tests/Objects/LegoBlockCustomPanel.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlockCustomPanel. + /// + // *** Start programmer edit section *** (LegoBlockCustomPanel CustomAttributes) + + // *** End programmer edit section *** (LegoBlockCustomPanel CustomAttributes) + [PublishName("LegoBlockCustomPanel")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlockCustomPanel : ICSSoft.STORMNET.DataObject + { + + private string fOrientation; + + private string fPosition; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPanelAngle fPanelAngle; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fBlock; + + // *** Start programmer edit section *** (LegoBlockCustomPanel CustomMembers) + + // *** End programmer edit section *** (LegoBlockCustomPanel CustomMembers) + + + /// + /// Orientation. + /// + // *** Start programmer edit section *** (LegoBlockCustomPanel.Orientation CustomAttributes) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Orientation CustomAttributes) + [StrLen(255)] + public virtual string Orientation + { + get + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Orientation Get start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Orientation Get start) + string result = this.fOrientation; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Orientation Get end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Orientation Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Orientation Set start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Orientation Set start) + this.fOrientation = value; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Orientation Set end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Orientation Set end) + } + } + + /// + /// Position. + /// + // *** Start programmer edit section *** (LegoBlockCustomPanel.Position CustomAttributes) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Position CustomAttributes) + [StrLen(255)] + public virtual string Position + { + get + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Position Get start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Position Get start) + string result = this.fPosition; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Position Get end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Position Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Position Set start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Position Set start) + this.fPosition = value; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Position Set end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Position Set end) + } + } + + /// + /// LegoBlockCustomPanel. + /// + // *** Start programmer edit section *** (LegoBlockCustomPanel.PanelAngle CustomAttributes) + + // *** End programmer edit section *** (LegoBlockCustomPanel.PanelAngle CustomAttributes) + [PropertyStorage(new string[] { + "PanelAngle"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPanelAngle PanelAngle + { + get + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.PanelAngle Get start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.PanelAngle Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPanelAngle result = this.fPanelAngle; + // *** Start programmer edit section *** (LegoBlockCustomPanel.PanelAngle Get end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.PanelAngle Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.PanelAngle Set start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.PanelAngle Set start) + this.fPanelAngle = value; + // *** Start programmer edit section *** (LegoBlockCustomPanel.PanelAngle Set end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.PanelAngle Set end) + } + } + + /// + /// мастеровая ссылка на шапку NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlockCustomPanel.Block CustomAttributes) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Block CustomAttributes) + [Agregator()] + [NotNull()] + [PropertyStorage(new string[] { + "Block"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock Block + { + get + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Block Get start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Block Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock result = this.fBlock; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Block Get end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Block Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockCustomPanel.Block Set start) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Block Set start) + this.fBlock = value; + // *** Start programmer edit section *** (LegoBlockCustomPanel.Block Set end) + + // *** End programmer edit section *** (LegoBlockCustomPanel.Block Set end) + } + } + } + + /// + /// Detail array of LegoBlockCustomPanel. + /// + // *** Start programmer edit section *** (DetailArrayDetailArrayOfLegoBlockCustomPanel CustomAttributes) + + // *** End programmer edit section *** (DetailArrayDetailArrayOfLegoBlockCustomPanel CustomAttributes) + public class DetailArrayOfLegoBlockCustomPanel : ICSSoft.STORMNET.DetailArray + { + + // *** Start programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel members) + + // *** End programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockCustomPanel members) + + + /// + /// Construct detail array. + /// + /// + /// Returns object with type LegoBlockCustomPanel by index. + /// + /// + /// Adds object with type LegoBlockCustomPanel. + /// + public DetailArrayOfLegoBlockCustomPanel(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fLegoBlock) : + base(typeof(LegoBlockCustomPanel), ((ICSSoft.STORMNET.DataObject)(fLegoBlock))) + { + } + + public NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockCustomPanel this[int index] + { + get + { + return ((NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockCustomPanel)(this.ItemByIndex(index))); + } + } + + public virtual void Add(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockCustomPanel dataobject) + { + this.AddObject(((ICSSoft.STORMNET.DataObject)(dataobject))); + } + } +} diff --git a/Tests/Objects/LegoBlockTopPanel.cs b/Tests/Objects/LegoBlockTopPanel.cs new file mode 100644 index 00000000..4c0080e3 --- /dev/null +++ b/Tests/Objects/LegoBlockTopPanel.cs @@ -0,0 +1,257 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlockTopPanel. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel CustomAttributes) + [PublishName("LegoBlockTopPanel")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlockTopPanel : ICSSoft.STORMNET.DataObject + { + + private int fWidthCount; + + private int fHeightCount; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoSocketStandard fSocketStandard; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole fHoles; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fBlock; + + // *** Start programmer edit section *** (LegoBlockTopPanel CustomMembers) + + // *** End programmer edit section *** (LegoBlockTopPanel CustomMembers) + + + /// + /// WidthCount. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel.WidthCount CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel.WidthCount CustomAttributes) + public virtual int WidthCount + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanel.WidthCount Get start) + + // *** End programmer edit section *** (LegoBlockTopPanel.WidthCount Get start) + int result = this.fWidthCount; + // *** Start programmer edit section *** (LegoBlockTopPanel.WidthCount Get end) + + // *** End programmer edit section *** (LegoBlockTopPanel.WidthCount Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanel.WidthCount Set start) + + // *** End programmer edit section *** (LegoBlockTopPanel.WidthCount Set start) + this.fWidthCount = value; + // *** Start programmer edit section *** (LegoBlockTopPanel.WidthCount Set end) + + // *** End programmer edit section *** (LegoBlockTopPanel.WidthCount Set end) + } + } + + /// + /// HeightCount. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel.HeightCount CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel.HeightCount CustomAttributes) + public virtual int HeightCount + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanel.HeightCount Get start) + + // *** End programmer edit section *** (LegoBlockTopPanel.HeightCount Get start) + int result = this.fHeightCount; + // *** Start programmer edit section *** (LegoBlockTopPanel.HeightCount Get end) + + // *** End programmer edit section *** (LegoBlockTopPanel.HeightCount Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanel.HeightCount Set start) + + // *** End programmer edit section *** (LegoBlockTopPanel.HeightCount Set start) + this.fHeightCount = value; + // *** Start programmer edit section *** (LegoBlockTopPanel.HeightCount Set end) + + // *** End programmer edit section *** (LegoBlockTopPanel.HeightCount Set end) + } + } + + /// + /// LegoBlockTopPanel. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel.SocketStandard CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel.SocketStandard CustomAttributes) + [PropertyStorage(new string[] { + "SocketStandard"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoSocketStandard SocketStandard + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanel.SocketStandard Get start) + + // *** End programmer edit section *** (LegoBlockTopPanel.SocketStandard Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoSocketStandard result = this.fSocketStandard; + // *** Start programmer edit section *** (LegoBlockTopPanel.SocketStandard Get end) + + // *** End programmer edit section *** (LegoBlockTopPanel.SocketStandard Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanel.SocketStandard Set start) + + // *** End programmer edit section *** (LegoBlockTopPanel.SocketStandard Set start) + this.fSocketStandard = value; + // *** Start programmer edit section *** (LegoBlockTopPanel.SocketStandard Set end) + + // *** End programmer edit section *** (LegoBlockTopPanel.SocketStandard Set end) + } + } + + /// + /// LegoBlockTopPanel. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel.Holes CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel.Holes CustomAttributes) + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole Holes + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanel.Holes Get start) + + // *** End programmer edit section *** (LegoBlockTopPanel.Holes Get start) + if ((this.fHoles == null)) + { + this.fHoles = new NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole(this); + } + NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole result = this.fHoles; + // *** Start programmer edit section *** (LegoBlockTopPanel.Holes Get end) + + // *** End programmer edit section *** (LegoBlockTopPanel.Holes Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanel.Holes Set start) + + // *** End programmer edit section *** (LegoBlockTopPanel.Holes Set start) + this.fHoles = value; + // *** Start programmer edit section *** (LegoBlockTopPanel.Holes Set end) + + // *** End programmer edit section *** (LegoBlockTopPanel.Holes Set end) + } + } + + /// + /// мастеровая ссылка на шапку NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock. + /// + // *** Start programmer edit section *** (LegoBlockTopPanel.Block CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanel.Block CustomAttributes) + [Agregator()] + [NotNull()] + [PropertyStorage(new string[] { + "Block"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock Block + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanel.Block Get start) + + // *** End programmer edit section *** (LegoBlockTopPanel.Block Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock result = this.fBlock; + // *** Start programmer edit section *** (LegoBlockTopPanel.Block Get end) + + // *** End programmer edit section *** (LegoBlockTopPanel.Block Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanel.Block Set start) + + // *** End programmer edit section *** (LegoBlockTopPanel.Block Set start) + this.fBlock = value; + // *** Start programmer edit section *** (LegoBlockTopPanel.Block Set end) + + // *** End programmer edit section *** (LegoBlockTopPanel.Block Set end) + } + } + } + + /// + /// Detail array of LegoBlockTopPanel. + /// + // *** Start programmer edit section *** (DetailArrayDetailArrayOfLegoBlockTopPanel CustomAttributes) + + // *** End programmer edit section *** (DetailArrayDetailArrayOfLegoBlockTopPanel CustomAttributes) + public class DetailArrayOfLegoBlockTopPanel : ICSSoft.STORMNET.DetailArray + { + + // *** Start programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel members) + + // *** End programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanel members) + + + /// + /// Construct detail array. + /// + /// + /// Returns object with type LegoBlockTopPanel by index. + /// + /// + /// Adds object with type LegoBlockTopPanel. + /// + public DetailArrayOfLegoBlockTopPanel(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock fLegoBlock) : + base(typeof(LegoBlockTopPanel), ((ICSSoft.STORMNET.DataObject)(fLegoBlock))) + { + } + + public NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel this[int index] + { + get + { + return ((NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel)(this.ItemByIndex(index))); + } + } + + public virtual void Add(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel dataobject) + { + this.AddObject(((ICSSoft.STORMNET.DataObject)(dataobject))); + } + } +} diff --git a/Tests/Objects/LegoBlockTopPanelHole.cs b/Tests/Objects/LegoBlockTopPanelHole.cs new file mode 100644 index 00000000..f54ebb9c --- /dev/null +++ b/Tests/Objects/LegoBlockTopPanelHole.cs @@ -0,0 +1,153 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoBlockTopPanelHole. + /// + // *** Start programmer edit section *** (LegoBlockTopPanelHole CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanelHole CustomAttributes) + [PublishName("LegoBlockTopPanelHole")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoBlockTopPanelHole : ICSSoft.STORMNET.DataObject + { + + private string fPosition; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel fTopPanel; + + // *** Start programmer edit section *** (LegoBlockTopPanelHole CustomMembers) + + // *** End programmer edit section *** (LegoBlockTopPanelHole CustomMembers) + + + /// + /// Position. + /// + // *** Start programmer edit section *** (LegoBlockTopPanelHole.Position CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.Position CustomAttributes) + [StrLen(255)] + public virtual string Position + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanelHole.Position Get start) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.Position Get start) + string result = this.fPosition; + // *** Start programmer edit section *** (LegoBlockTopPanelHole.Position Get end) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.Position Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanelHole.Position Set start) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.Position Set start) + this.fPosition = value; + // *** Start programmer edit section *** (LegoBlockTopPanelHole.Position Set end) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.Position Set end) + } + } + + /// + /// мастеровая ссылка на шапку NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel. + /// + // *** Start programmer edit section *** (LegoBlockTopPanelHole.TopPanel CustomAttributes) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.TopPanel CustomAttributes) + [Agregator()] + [NotNull()] + [PropertyStorage(new string[] { + "TopPanel"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel TopPanel + { + get + { + // *** Start programmer edit section *** (LegoBlockTopPanelHole.TopPanel Get start) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.TopPanel Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel result = this.fTopPanel; + // *** Start programmer edit section *** (LegoBlockTopPanelHole.TopPanel Get end) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.TopPanel Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoBlockTopPanelHole.TopPanel Set start) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.TopPanel Set start) + this.fTopPanel = value; + // *** Start programmer edit section *** (LegoBlockTopPanelHole.TopPanel Set end) + + // *** End programmer edit section *** (LegoBlockTopPanelHole.TopPanel Set end) + } + } + } + + /// + /// Detail array of LegoBlockTopPanelHole. + /// + // *** Start programmer edit section *** (DetailArrayDetailArrayOfLegoBlockTopPanelHole CustomAttributes) + + // *** End programmer edit section *** (DetailArrayDetailArrayOfLegoBlockTopPanelHole CustomAttributes) + public class DetailArrayOfLegoBlockTopPanelHole : ICSSoft.STORMNET.DetailArray + { + + // *** Start programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole members) + + // *** End programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoBlockTopPanelHole members) + + + /// + /// Construct detail array. + /// + /// + /// Returns object with type LegoBlockTopPanelHole by index. + /// + /// + /// Adds object with type LegoBlockTopPanelHole. + /// + public DetailArrayOfLegoBlockTopPanelHole(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanel fLegoBlockTopPanel) : + base(typeof(LegoBlockTopPanelHole), ((ICSSoft.STORMNET.DataObject)(fLegoBlockTopPanel))) + { + } + + public NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanelHole this[int index] + { + get + { + return ((NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanelHole)(this.ItemByIndex(index))); + } + } + + public virtual void Add(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlockTopPanelHole dataobject) + { + this.AddObject(((ICSSoft.STORMNET.DataObject)(dataobject))); + } + } +} diff --git a/Tests/Objects/LegoDevice.cs b/Tests/Objects/LegoDevice.cs new file mode 100644 index 00000000..a0a0911c --- /dev/null +++ b/Tests/Objects/LegoDevice.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoDevice. + /// + // *** Start programmer edit section *** (LegoDevice CustomAttributes) + + // *** End programmer edit section *** (LegoDevice CustomAttributes) + [PublishName("LegoDevice")] + [AutoAltered()] + [ICSSoft.STORMNET.NotStored(false)] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoDevice : NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock + { + + private string fDescription; + + private bool fElectricity; + + // *** Start programmer edit section *** (LegoDevice CustomMembers) + + // *** End programmer edit section *** (LegoDevice CustomMembers) + + + /// + /// Description. + /// + // *** Start programmer edit section *** (LegoDevice.Description CustomAttributes) + + // *** End programmer edit section *** (LegoDevice.Description CustomAttributes) + [StrLen(255)] + public virtual string Description + { + get + { + // *** Start programmer edit section *** (LegoDevice.Description Get start) + + // *** End programmer edit section *** (LegoDevice.Description Get start) + string result = this.fDescription; + // *** Start programmer edit section *** (LegoDevice.Description Get end) + + // *** End programmer edit section *** (LegoDevice.Description Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoDevice.Description Set start) + + // *** End programmer edit section *** (LegoDevice.Description Set start) + this.fDescription = value; + // *** Start programmer edit section *** (LegoDevice.Description Set end) + + // *** End programmer edit section *** (LegoDevice.Description Set end) + } + } + + /// + /// Electricity. + /// + // *** Start programmer edit section *** (LegoDevice.Electricity CustomAttributes) + + // *** End programmer edit section *** (LegoDevice.Electricity CustomAttributes) + public virtual bool Electricity + { + get + { + // *** Start programmer edit section *** (LegoDevice.Electricity Get start) + + // *** End programmer edit section *** (LegoDevice.Electricity Get start) + bool result = this.fElectricity; + // *** Start programmer edit section *** (LegoDevice.Electricity Get end) + + // *** End programmer edit section *** (LegoDevice.Electricity Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoDevice.Electricity Set start) + + // *** End programmer edit section *** (LegoDevice.Electricity Set start) + this.fElectricity = value; + // *** Start programmer edit section *** (LegoDevice.Electricity Set end) + + // *** End programmer edit section *** (LegoDevice.Electricity Set end) + } + } + } +} diff --git a/Tests/Objects/LegoMaterial.cs b/Tests/Objects/LegoMaterial.cs new file mode 100644 index 00000000..b725b1d0 --- /dev/null +++ b/Tests/Objects/LegoMaterial.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoMaterial. + /// + // *** Start programmer edit section *** (LegoMaterial CustomAttributes) + + // *** End programmer edit section *** (LegoMaterial CustomAttributes) + [PublishName("LegoMaterial")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoMaterial : ICSSoft.STORMNET.DataObject + { + + private string fName; + + // *** Start programmer edit section *** (LegoMaterial CustomMembers) + + // *** End programmer edit section *** (LegoMaterial CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (LegoMaterial.Name CustomAttributes) + + // *** End programmer edit section *** (LegoMaterial.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (LegoMaterial.Name Get start) + + // *** End programmer edit section *** (LegoMaterial.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (LegoMaterial.Name Get end) + + // *** End programmer edit section *** (LegoMaterial.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoMaterial.Name Set start) + + // *** End programmer edit section *** (LegoMaterial.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (LegoMaterial.Name Set end) + + // *** End programmer edit section *** (LegoMaterial.Name Set end) + } + } + } +} diff --git a/Tests/Objects/LegoPanelAngle.cs b/Tests/Objects/LegoPanelAngle.cs new file mode 100644 index 00000000..ffc2596e --- /dev/null +++ b/Tests/Objects/LegoPanelAngle.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoPanelAngle. + /// + // *** Start programmer edit section *** (LegoPanelAngle CustomAttributes) + + // *** End programmer edit section *** (LegoPanelAngle CustomAttributes) + [PublishName("LegoPanelAngle")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoPanelAngle : ICSSoft.STORMNET.DataObject + { + + private string fName; + + private int fAngle; + + // *** Start programmer edit section *** (LegoPanelAngle CustomMembers) + + // *** End programmer edit section *** (LegoPanelAngle CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (LegoPanelAngle.Name CustomAttributes) + + // *** End programmer edit section *** (LegoPanelAngle.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (LegoPanelAngle.Name Get start) + + // *** End programmer edit section *** (LegoPanelAngle.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (LegoPanelAngle.Name Get end) + + // *** End programmer edit section *** (LegoPanelAngle.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPanelAngle.Name Set start) + + // *** End programmer edit section *** (LegoPanelAngle.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (LegoPanelAngle.Name Set end) + + // *** End programmer edit section *** (LegoPanelAngle.Name Set end) + } + } + + /// + /// Angle. + /// + // *** Start programmer edit section *** (LegoPanelAngle.Angle CustomAttributes) + + // *** End programmer edit section *** (LegoPanelAngle.Angle CustomAttributes) + public virtual int Angle + { + get + { + // *** Start programmer edit section *** (LegoPanelAngle.Angle Get start) + + // *** End programmer edit section *** (LegoPanelAngle.Angle Get start) + int result = this.fAngle; + // *** Start programmer edit section *** (LegoPanelAngle.Angle Get end) + + // *** End programmer edit section *** (LegoPanelAngle.Angle Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPanelAngle.Angle Set start) + + // *** End programmer edit section *** (LegoPanelAngle.Angle Set start) + this.fAngle = value; + // *** Start programmer edit section *** (LegoPanelAngle.Angle Set end) + + // *** End programmer edit section *** (LegoPanelAngle.Angle Set end) + } + } + } +} diff --git a/Tests/Objects/LegoPatent.cs b/Tests/Objects/LegoPatent.cs new file mode 100644 index 00000000..7925ec4a --- /dev/null +++ b/Tests/Objects/LegoPatent.cs @@ -0,0 +1,256 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoPatent. + /// + // *** Start programmer edit section *** (LegoPatent CustomAttributes) + + // *** End programmer edit section *** (LegoPatent CustomAttributes) + [PublishName("LegoPatent")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoPatent : ICSSoft.STORMNET.DataObject + { + + private string fName; + + private System.DateTime fDate; + + private string fAuthors; + + private string fDescription; + + private NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock fBaseLegoBlock; + + // *** Start programmer edit section *** (LegoPatent CustomMembers) + + // *** End programmer edit section *** (LegoPatent CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (LegoPatent.Name CustomAttributes) + + // *** End programmer edit section *** (LegoPatent.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (LegoPatent.Name Get start) + + // *** End programmer edit section *** (LegoPatent.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (LegoPatent.Name Get end) + + // *** End programmer edit section *** (LegoPatent.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPatent.Name Set start) + + // *** End programmer edit section *** (LegoPatent.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (LegoPatent.Name Set end) + + // *** End programmer edit section *** (LegoPatent.Name Set end) + } + } + + /// + /// Date. + /// + // *** Start programmer edit section *** (LegoPatent.Date CustomAttributes) + + // *** End programmer edit section *** (LegoPatent.Date CustomAttributes) + public virtual System.DateTime Date + { + get + { + // *** Start programmer edit section *** (LegoPatent.Date Get start) + + // *** End programmer edit section *** (LegoPatent.Date Get start) + System.DateTime result = this.fDate; + // *** Start programmer edit section *** (LegoPatent.Date Get end) + + // *** End programmer edit section *** (LegoPatent.Date Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPatent.Date Set start) + + // *** End programmer edit section *** (LegoPatent.Date Set start) + this.fDate = value; + // *** Start programmer edit section *** (LegoPatent.Date Set end) + + // *** End programmer edit section *** (LegoPatent.Date Set end) + } + } + + /// + /// Authors. + /// + // *** Start programmer edit section *** (LegoPatent.Authors CustomAttributes) + + // *** End programmer edit section *** (LegoPatent.Authors CustomAttributes) + [StrLen(255)] + public virtual string Authors + { + get + { + // *** Start programmer edit section *** (LegoPatent.Authors Get start) + + // *** End programmer edit section *** (LegoPatent.Authors Get start) + string result = this.fAuthors; + // *** Start programmer edit section *** (LegoPatent.Authors Get end) + + // *** End programmer edit section *** (LegoPatent.Authors Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPatent.Authors Set start) + + // *** End programmer edit section *** (LegoPatent.Authors Set start) + this.fAuthors = value; + // *** Start programmer edit section *** (LegoPatent.Authors Set end) + + // *** End programmer edit section *** (LegoPatent.Authors Set end) + } + } + + /// + /// Description. + /// + // *** Start programmer edit section *** (LegoPatent.Description CustomAttributes) + + // *** End programmer edit section *** (LegoPatent.Description CustomAttributes) + [StrLen(255)] + public virtual string Description + { + get + { + // *** Start programmer edit section *** (LegoPatent.Description Get start) + + // *** End programmer edit section *** (LegoPatent.Description Get start) + string result = this.fDescription; + // *** Start programmer edit section *** (LegoPatent.Description Get end) + + // *** End programmer edit section *** (LegoPatent.Description Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPatent.Description Set start) + + // *** End programmer edit section *** (LegoPatent.Description Set start) + this.fDescription = value; + // *** Start programmer edit section *** (LegoPatent.Description Set end) + + // *** End programmer edit section *** (LegoPatent.Description Set end) + } + } + + /// + /// мастеровая ссылка на шапку NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock. + /// + // *** Start programmer edit section *** (LegoPatent.BaseLegoBlock CustomAttributes) + + // *** End programmer edit section *** (LegoPatent.BaseLegoBlock CustomAttributes) + [Agregator()] + [NotNull()] + [PropertyStorage("/BaseLegoBlock")] + [TypeUsage(new string[] { + "NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock", + "NewPlatform.Flexberry.ORM.ODataService.Tests.LegoDevice"})] + public virtual NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock BaseLegoBlock + { + get + { + // *** Start programmer edit section *** (LegoPatent.BaseLegoBlock Get start) + + // *** End programmer edit section *** (LegoPatent.BaseLegoBlock Get start) + NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock result = this.fBaseLegoBlock; + // *** Start programmer edit section *** (LegoPatent.BaseLegoBlock Get end) + + // *** End programmer edit section *** (LegoPatent.BaseLegoBlock Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoPatent.BaseLegoBlock Set start) + + // *** End programmer edit section *** (LegoPatent.BaseLegoBlock Set start) + this.fBaseLegoBlock = value; + // *** Start programmer edit section *** (LegoPatent.BaseLegoBlock Set end) + + // *** End programmer edit section *** (LegoPatent.BaseLegoBlock Set end) + } + } + } + + /// + /// Detail array of LegoPatent. + /// + // *** Start programmer edit section *** (DetailArrayDetailArrayOfLegoPatent CustomAttributes) + + // *** End programmer edit section *** (DetailArrayDetailArrayOfLegoPatent CustomAttributes) + public class DetailArrayOfLegoPatent : ICSSoft.STORMNET.DetailArray + { + + // *** Start programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent members) + + // *** End programmer edit section *** (NewPlatform.Flexberry.ORM.ODataService.Tests.DetailArrayOfLegoPatent members) + + + /// + /// Construct detail array. + /// + /// + /// Returns object with type LegoPatent by index. + /// + /// + /// Adds object with type LegoPatent. + /// + public DetailArrayOfLegoPatent(NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBlock fBaseLegoBlock) : + base(typeof(LegoPatent), ((ICSSoft.STORMNET.DataObject)(fBaseLegoBlock))) + { + } + + public NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPatent this[int index] + { + get + { + return ((NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPatent)(this.ItemByIndex(index))); + } + } + + public virtual void Add(NewPlatform.Flexberry.ORM.ODataService.Tests.LegoPatent dataobject) + { + this.AddObject(((ICSSoft.STORMNET.DataObject)(dataobject))); + } + } +} diff --git a/Tests/Objects/LegoSocketStandard.cs b/Tests/Objects/LegoSocketStandard.cs new file mode 100644 index 00000000..07d6a306 --- /dev/null +++ b/Tests/Objects/LegoSocketStandard.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace NewPlatform.Flexberry.ORM.ODataService.Tests +{ + using System; + using System.Xml; + using ICSSoft.STORMNET; + + + // *** Start programmer edit section *** (Using statements) + + // *** End programmer edit section *** (Using statements) + + + /// + /// LegoSocketStandard. + /// + // *** Start programmer edit section *** (LegoSocketStandard CustomAttributes) + + // *** End programmer edit section *** (LegoSocketStandard CustomAttributes) + [PublishName("LegoSocketStandard")] + [AutoAltered()] + [AccessType(ICSSoft.STORMNET.AccessType.none)] + public class LegoSocketStandard : ICSSoft.STORMNET.DataObject + { + + private string fName; + + // *** Start programmer edit section *** (LegoSocketStandard CustomMembers) + + // *** End programmer edit section *** (LegoSocketStandard CustomMembers) + + + /// + /// Name. + /// + // *** Start programmer edit section *** (LegoSocketStandard.Name CustomAttributes) + + // *** End programmer edit section *** (LegoSocketStandard.Name CustomAttributes) + [StrLen(255)] + public virtual string Name + { + get + { + // *** Start programmer edit section *** (LegoSocketStandard.Name Get start) + + // *** End programmer edit section *** (LegoSocketStandard.Name Get start) + string result = this.fName; + // *** Start programmer edit section *** (LegoSocketStandard.Name Get end) + + // *** End programmer edit section *** (LegoSocketStandard.Name Get end) + return result; + } + set + { + // *** Start programmer edit section *** (LegoSocketStandard.Name Set start) + + // *** End programmer edit section *** (LegoSocketStandard.Name Set start) + this.fName = value; + // *** Start programmer edit section *** (LegoSocketStandard.Name Set end) + + // *** End programmer edit section *** (LegoSocketStandard.Name Set end) + } + } + } +} diff --git a/Tests/Objects/NewPlatform.Flexberry.ORM.ODataService.Tests.Objects.csproj b/Tests/Objects/NewPlatform.Flexberry.ORM.ODataService.Tests.Objects.csproj index adf7ae23..e50878ef 100644 --- a/Tests/Objects/NewPlatform.Flexberry.ORM.ODataService.Tests.Objects.csproj +++ b/Tests/Objects/NewPlatform.Flexberry.ORM.ODataService.Tests.Objects.csproj @@ -150,11 +150,23 @@ + + + + + + + + + + + + diff --git "a/Tests/Objects/\320\221\320\265\321\200\320\273\320\276\320\263\320\260.cs" "b/Tests/Objects/\320\221\320\265\321\200\320\273\320\276\320\263\320\260.cs" index 0b736d1d..ad08b314 100644 --- "a/Tests/Objects/\320\221\320\265\321\200\320\273\320\276\320\263\320\260.cs" +++ "b/Tests/Objects/\320\221\320\265\321\200\320\273\320\276\320\263\320\260.cs" @@ -27,8 +27,8 @@ namespace NewPlatform.Flexberry.ORM.ODataService.Tests // *** Start programmer edit section *** (Берлога CustomAttributes) // *** End programmer edit section *** (Берлога CustomAttributes) - [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.БерлогаБС, NewPlatform.Flexberry.ORM" + - ".ODataService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] + [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.DenBS, NewPlatform.Flexberry.ORM.ODa" + + "taService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] [AutoAltered()] [AccessType(ICSSoft.STORMNET.AccessType.none)] [View("LoadTestView", new string[] { diff --git "a/Tests/Objects/\320\233\320\265\321\201.cs" "b/Tests/Objects/\320\233\320\265\321\201.cs" index 99508dd0..58845ab6 100644 --- "a/Tests/Objects/\320\233\320\265\321\201.cs" +++ "b/Tests/Objects/\320\233\320\265\321\201.cs" @@ -27,8 +27,8 @@ namespace NewPlatform.Flexberry.ORM.ODataService.Tests // *** Start programmer edit section *** (Лес CustomAttributes) // *** End programmer edit section *** (Лес CustomAttributes) - [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.ЛесБС, NewPlatform.Flexberry.ORM.ODa" + - "taService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] + [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.ForestBS, NewPlatform.Flexberry.ORM." + + "ODataService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] [AutoAltered()] [AccessType(ICSSoft.STORMNET.AccessType.none)] [View("ЛесE", new string[] { diff --git "a/Tests/Objects/\320\234\320\265\320\264\320\262\320\265\320\264\321\214.cs" "b/Tests/Objects/\320\234\320\265\320\264\320\262\320\265\320\264\321\214.cs" index 3ae4b3c0..494fed1c 100644 --- "a/Tests/Objects/\320\234\320\265\320\264\320\262\320\265\320\264\321\214.cs" +++ "b/Tests/Objects/\320\234\320\265\320\264\320\262\320\265\320\264\321\214.cs" @@ -30,8 +30,8 @@ namespace NewPlatform.Flexberry.ORM.ODataService.Tests // *** Start programmer edit section *** (Медведь CustomAttributes) // *** End programmer edit section *** (Медведь CustomAttributes) - [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.МедведьБС, NewPlatform.Flexberry.ORM" + - ".ODataService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] + [BusinessServer("NewPlatform.Flexberry.ORM.ODataService.Tests.BearBS, NewPlatform.Flexberry.ORM.OD" + + "ataService.Tests.BusinessServers", ICSSoft.STORMNET.Business.DataServiceObjectEvents.OnAllEvents)] [AutoAltered()] [AccessType(ICSSoft.STORMNET.AccessType.none)] [View("LoadTestView", new string[] { From d2914705e14e6f451db57593a6fcabe5c706b20b Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Tue, 30 Mar 2021 00:16:46 +0500 Subject: [PATCH 3/7] Add test for creation --- .../CRUD/Update/ModifyDataTest.cs | 99 + .../SqlScripts/PostgresScript.sql | 2350 ++++++++--------- Tests/Objects/LegoBlock.cs | 30 +- Tests/Objects/LegoPatent.cs | 4 +- 4 files changed, 1289 insertions(+), 1194 deletions(-) diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs index 0f903c1d..a3faa723 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs @@ -1599,7 +1599,106 @@ public void UpdateDetailAndDetailTest() Assert.Equal(newValue, базовыйКласс.Адрес = newValue); Assert.Equal(newValue, базовыйКласс.Книга[0].Название); Assert.Equal(newIntValue, базовыйКласс.Журнал[0].Номер); + } + }); + } + + /// + /// Test batch update detail with inheritance. + /// + [Fact] + public void UpdateInheritanceDetailTest() + { + ActODataService(args => + { + /* + 1. Сохраняется новый LegoBlock + 2. с детейлами LegoBlockBottomPanel + 3. Сохраняется детейл LegoBlockTopPanel + 4. Сохраняются детейлы LegoBlockTopPanelHole + 5. Сохраняются детейлы LegoPatent + */ + + LegoBlock legoBlock = new LegoBlock() { Name = "Прямоугольник" }; + View legoBlockView = new View() { DefineClassType = typeof(LegoBlock), Name = "V" }; + legoBlockView.AddProperty(nameof(LegoBlock.__PrimaryKey)); + legoBlockView.AddProperty(nameof(LegoBlock.Name)); + var legoBlockJson = legoBlock.ToJson(legoBlockView, args.Token.Model); + + LegoBlockBottomPanel legoBlockBottomPanel = new LegoBlockBottomPanel() { HeightCount = 2, WidthCount = 2 }; + legoBlock.BottomPanels.Add(legoBlockBottomPanel); + View legoBlockBottomPanelView = new View() { DefineClassType = typeof(LegoBlockBottomPanel), Name = "V" }; + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.__PrimaryKey)); + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.HeightCount)); + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.WidthCount)); + var legoBlockBottomPanelJson = legoBlockBottomPanel.ToJson(legoBlockBottomPanelView, args.Token.Model); + DataObjectDictionary det1Json = DataObjectDictionary.Parse(legoBlockBottomPanelJson, legoBlockBottomPanelView, args.Token.Model); + det1Json.Add($"{nameof(LegoBlockBottomPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoBlockBottomPanelJson = det1Json.Serialize(); + + LegoBlockTopPanel legoBlockTopPanel = new LegoBlockTopPanel() { HeightCount = 3, WidthCount = 3 }; + legoBlock.TopPanels.Add(legoBlockTopPanel); + View legoBlockTopPanelView = new View() { DefineClassType = typeof(LegoBlockTopPanel), Name = "V" }; + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.__PrimaryKey)); + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.HeightCount)); + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.WidthCount)); + var legoBlockTopPanelJson = legoBlockTopPanel.ToJson(legoBlockTopPanelView, args.Token.Model); + DataObjectDictionary det2Json = DataObjectDictionary.Parse(legoBlockTopPanelJson, legoBlockTopPanelView, args.Token.Model); + det2Json.Add($"{nameof(LegoBlockTopPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoBlockTopPanelJson = det2Json.Serialize(); + + LegoBlockTopPanelHole legoBlockTopPanelHole = new LegoBlockTopPanelHole() { Position = "Центр" }; + legoBlockTopPanel.Holes.Add(legoBlockTopPanelHole); + View legoBlockTopPanelHoleView = new View() { DefineClassType = typeof(LegoBlockTopPanelHole), Name = "V" }; + legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.__PrimaryKey)); + legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.Position)); + var legoBlockTopPanelHoleJson = legoBlockTopPanelHole.ToJson(legoBlockTopPanelHoleView, args.Token.Model); + DataObjectDictionary det3Json = DataObjectDictionary.Parse(legoBlockTopPanelHoleJson, legoBlockTopPanelHoleView, args.Token.Model); + det3Json.Add($"{nameof(LegoBlockTopPanelHole.TopPanel)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}({((KeyGuid)legoBlockTopPanel.__PrimaryKey).Guid:D})"); + legoBlockTopPanelHoleJson = det3Json.Serialize(); + + LegoPatent legoPatent = new LegoPatent() { Authors = "Phill", Date = DateTime.Now, Name = "Кубики с пимпочками и дырками", Description = "Вот" }; + legoBlock.Patents.Add(legoPatent); + View legoPatentView = new View() { DefineClassType = typeof(LegoPatent), Name = "V" }; + legoPatentView.AddProperty(nameof(LegoPatent.__PrimaryKey)); + legoPatentView.AddProperty(nameof(LegoPatent.Authors)); + legoPatentView.AddProperty(nameof(LegoPatent.Date)); + legoPatentView.AddProperty(nameof(LegoPatent.Name)); + legoPatentView.AddProperty(nameof(LegoPatent.Description)); + var legoPatentJson = legoPatent.ToJson(legoPatentView, args.Token.Model); + DataObjectDictionary det4Json = DataObjectDictionary.Parse(legoPatentJson, legoPatentView, args.Token.Model); + det4Json.Add($"{nameof(LegoPatent.BaseLegoBlock)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoPatentJson = det4Json.Serialize(); + + const string baseUrl = "http://localhost/odata"; + string[] changesets = new[] +{ + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}", + legoBlockJson, + legoBlock), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockBottomPanel)).Name}", + legoBlockBottomPanelJson, + legoBlockBottomPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}", + legoBlockTopPanelJson, + legoBlockTopPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", + legoBlockTopPanelHoleJson, + legoBlockTopPanelHole), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoPatent)).Name}", + legoPatentJson, + legoPatent), + }; + HttpRequestMessage batchRequest = CreateBatchRequest(baseUrl, changesets); + using (HttpResponseMessage response = args.HttpClient.SendAsync(batchRequest).Result) + { + CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created }); } }); } diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql index b46e6357..349bf10f 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/SqlScripts/PostgresScript.sql @@ -1,1178 +1,1172 @@ - - - - - -CREATE TABLE LegoPanelAngle ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - Angle INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Driver ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - CarCount INT NULL, - - Documents BOOLEAN NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Страна ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Master ( - - primaryKey UUID NOT NULL, - - property VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Лес ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Площадь INT NULL, - - Заповедник BOOLEAN NULL, - - ДатаПослОсмотра TIMESTAMP(3) NULL, - - Страна UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Son ( - - primaryKey UUID NOT NULL, - - SuspendersColor VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Parent UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ТипПороды ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - ДатаРегистрации TIMESTAMP(3) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Порода ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - ТипПороды_m0 UUID NULL, - - Иерархия_m0 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE TestDetailWithCicle ( - - primaryKey UUID NOT NULL, - - TestDetailName VARCHAR(255) NULL, - - Parent UUID NULL, - - TestMaster UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlockCustomPanel ( - - primaryKey UUID NOT NULL, - - Orientation VARCHAR(255) NULL, - - Position VARCHAR(255) NULL, - - PanelAngle UUID NULL, - - Block UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Daughter ( - - primaryKey UUID NOT NULL, - - DressColor VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Parent UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассСМножТипов ( - - primaryKey UUID NOT NULL, - - PropertyGeography GEOMETRY NULL, - - PropertyEnum VARCHAR(0) NULL, - - PropertyBool BOOLEAN NULL, - - PropertyInt INT NULL, - - PropertyDateTime TIMESTAMP(3) NULL, - - PropertyString VARCHAR(255) NULL, - - PropertyFloat REAL NULL, - - PropertyDouble DOUBLE PRECISION NULL, - - PropertyDecimal DECIMAL NULL, - - PropertySystemNullableDateTime TIMESTAMP(3) NULL, - - PropertySystemNullableInt INT NULL, - - PropertySystemNullableGuid UUID NULL, - - PropertySystemNullableDecimal DECIMAL NULL, - - PropStormnetNullableDateTime TIMESTAMP(3) NULL, - - PropertyStormnetNullableInt INT NULL, - - PropertyStormnetKeyGuid UUID NULL, - - PropStormnetNullableDecimal DECIMAL NULL, - - PropertyStormnetPartliedDate VARCHAR(255) NULL, - - PropertyStormnetContact TEXT NULL, - - PropertyStormnetBlob TEXT NULL, - - PropertyStormnetEvent TEXT NULL, - - PropertyStormnetGeoData TEXT NULL, - - PropertyStormnetImage TEXT NULL, - - PropertyStormnetWebFile TEXT NULL, - - PropertyStormnetFile TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Медведь ( - - primaryKey UUID NOT NULL, - - ПолеБС VARCHAR(255) NULL, - - ПорядковыйНомер INT NULL, - - Вес INT NULL, - - ЦветГлаз VARCHAR(255) NULL, - - Пол VARCHAR(9) NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - CreateTime TIMESTAMP(3) NULL, - - Creator VARCHAR(255) NULL, - - EditTime TIMESTAMP(3) NULL, - - Editor VARCHAR(255) NULL, - - Страна UUID NULL, - - ЛесОбитания UUID NULL, - - Мама UUID NULL, - - Папа UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlockColor ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - ColorNumber INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Детейл ( - - primaryKey UUID NOT NULL, - - prop1 INT NULL, - - БазовыйКласс_m0 UUID NULL, - - БазовыйКласс_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ДочернийКласс ( - - primaryKey UUID NOT NULL, - - ChildProperty VARCHAR(255) NULL, - - PropertyGeography GEOMETRY NULL, - - PropertyEnum VARCHAR(0) NULL, - - PropertyBool BOOLEAN NULL, - - PropertyInt INT NULL, - - PropertyDateTime TIMESTAMP(3) NULL, - - PropertyString VARCHAR(255) NULL, - - PropertyFloat REAL NULL, - - PropertyDouble DOUBLE PRECISION NULL, - - PropertyDecimal DECIMAL NULL, - - PropertySystemNullableDateTime TIMESTAMP(3) NULL, - - PropertySystemNullableInt INT NULL, - - PropertySystemNullableGuid UUID NULL, - - PropertySystemNullableDecimal DECIMAL NULL, - - PropStormnetNullableDateTime TIMESTAMP(3) NULL, - - PropertyStormnetNullableInt INT NULL, - - PropertyStormnetKeyGuid UUID NULL, - - PropStormnetNullableDecimal DECIMAL NULL, - - PropertyStormnetPartliedDate VARCHAR(255) NULL, - - PropertyStormnetContact TEXT NULL, - - PropertyStormnetBlob TEXT NULL, - - PropertyStormnetEvent TEXT NULL, - - PropertyStormnetGeoData TEXT NULL, - - PropertyStormnetImage TEXT NULL, - - PropertyStormnetWebFile TEXT NULL, - - PropertyStormnetFile TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Книга ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Автор1 UUID NOT NULL, - - Библиотека1 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlock ( - - primaryKey UUID NOT NULL, - - Width INT NULL, - - Height INT NULL, - - Top INT NULL, - - Configuration VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - BlockId INT NULL, - - Material UUID NULL, - - Color UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Person ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoSocketStandard ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Перелом ( - - primaryKey UUID NOT NULL, - - Дата TIMESTAMP(3) NULL, - - Тип VARCHAR(0) NULL, - - Лапа_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE БазовыйКласс ( - - primaryKey UUID NOT NULL, - - Свойство1 VARCHAR(255) NULL, - - Свойство2 INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ПоставщикКниг ( - - primaryKey UUID NOT NULL, - - Ссылка UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Мастер2 ( - - primaryKey UUID NOT NULL, - - свойство2 INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoDevice ( - - primaryKey UUID NOT NULL, - - Description VARCHAR(255) NULL, - - Electricity BOOLEAN NULL, - - Name VARCHAR(255) NULL, - - BlockId INT NULL, - - Color UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Наследник ( - - primaryKey UUID NOT NULL, - - Свойство DOUBLE PRECISION NULL, - - Свойство1 VARCHAR(255) NULL, - - Свойство2 INT NULL, - - Мастер UUID NULL, - - Master UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Car ( - - primaryKey UUID NOT NULL, - - Number VARCHAR(255) NULL, - - Model VARCHAR(255) NULL, - - TipCar VARCHAR(0) NULL, - - driver UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Мастер ( - - primaryKey UUID NOT NULL, - - prop VARCHAR(255) NULL, - - Мастер2 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Блоха ( - - primaryKey UUID NOT NULL, - - Кличка VARCHAR(255) NULL, - - МедведьОбитания UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoPatent ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - Date TIMESTAMP(3) NULL, - - Authors VARCHAR(255) NULL, - - Description VARCHAR(255) NULL, - - /BaseLegoBlock_m0 UUID NULL, - - /BaseLegoBlock_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Лапа ( - - primaryKey UUID NOT NULL, - - Цвет VARCHAR(255) NULL, - - Размер INT NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - БылиЛиПереломы BOOLEAN NULL, - - Сторона VARCHAR(0) NULL, - - Номер INT NULL, - - РазмерDouble DOUBLE PRECISION NULL, - - РазмерFloat REAL NULL, - - РазмерDecimal DECIMAL NULL, - - ТипЛапы_m0 UUID NULL, - - Кошка_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассСоСтрокКл ( - - StoragePrimaryKey VARCHAR(255) NOT NULL, - - PRIMARY KEY (StoragePrimaryKey)); - - - -CREATE TABLE Берлога ( - - primaryKey UUID NOT NULL, - - ПолеБС VARCHAR(255) NULL, - - Наименование VARCHAR(255) NULL, - - Комфортность INT NULL, - - Заброшена BOOLEAN NULL, - - Сертификат TEXT NULL, - - CertString TEXT NULL, - - ЛесРасположения UUID NULL, - - Медведь UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Автор ( - - primaryKey UUID NOT NULL, - - Имя VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE TestMaster ( - - primaryKey UUID NOT NULL, - - TestMasterName VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Котенок ( - - primaryKey UUID NOT NULL, - - КличкаКотенка VARCHAR(255) NULL, - - Глупость INT NULL, - - Кошка_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Библиотека ( - - primaryKey UUID NOT NULL, - - Адрес VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoMaterial ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlockBottomPanel ( - - primaryKey UUID NOT NULL, - - WidthCount INT NULL, - - HeightCount INT NULL, - - Block UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlockTopPanelHole ( - - primaryKey UUID NOT NULL, - - Position VARCHAR(255) NULL, - - TopPanel UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Детейл2 ( - - primaryKey UUID NOT NULL, - - prop2 VARCHAR(255) NULL, - - Детейл_m0 UUID NULL, - - Детейл_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Журнал ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Номер INT NULL, - - Автор2 UUID NOT NULL, - - Библиотека2 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE LegoBlockTopPanel ( - - primaryKey UUID NOT NULL, - - WidthCount INT NULL, - - HeightCount INT NULL, - - SocketStandard UUID NULL, - - Block UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ТипЛапы ( - - primaryKey UUID NOT NULL, - - Название VARCHAR(255) NULL, - - Актуально BOOLEAN NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE КлассStoredDerived ( - - primaryKey UUID NOT NULL, - - StrAttr2 VARCHAR(255) NULL, - - StrAttr VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE Кошка ( - - primaryKey UUID NOT NULL, - - Кличка VARCHAR(255) NULL, - - ДатаРождения TIMESTAMP(3) NULL, - - Тип VARCHAR(0) NULL, - - ПородаСтрокой VARCHAR(255) NULL, - - Агрессивная BOOLEAN NULL, - - УсыСлева INT NULL, - - УсыСправа INT NULL, - - Порода_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ДетейлНаследник ( - - primaryKey UUID NOT NULL, - - prop3 VARCHAR(255) NULL, - - prop1 INT NULL, - - БазовыйКласс_m0 UUID NULL, - - БазовыйКласс_m1 UUID NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMNETLOCKDATA ( - - LockKey VARCHAR(300) NOT NULL, - - UserName VARCHAR(300) NOT NULL, - - LockDate TIMESTAMP(3) NULL, - - PRIMARY KEY (LockKey)); - - - -CREATE TABLE STORMSETTINGS ( - - primaryKey UUID NOT NULL, - - Module VARCHAR(1000) NULL, - - Name VARCHAR(255) NULL, - - Value TEXT NULL, - - "User" VARCHAR(255) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAdvLimit ( - - primaryKey UUID NOT NULL, - - "User" VARCHAR(255) NULL, - - Published BOOLEAN NULL, - - Module VARCHAR(255) NULL, - - Name VARCHAR(255) NULL, - - Value TEXT NULL, - - HotKeyData INT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERSETTING ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - DataObjectView VARCHAR(255) NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMWEBSEARCH ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - "Order" INT NOT NULL, - - PresentView VARCHAR(255) NOT NULL, - - DetailedView VARCHAR(255) NOT NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERDETAIL ( - - primaryKey UUID NOT NULL, - - Caption VARCHAR(255) NOT NULL, - - DataObjectView VARCHAR(255) NOT NULL, - - ConnectMasterProp VARCHAR(255) NOT NULL, - - OwnerConnectProp VARCHAR(255) NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMFILTERLOOKUP ( - - primaryKey UUID NOT NULL, - - DataObjectType VARCHAR(255) NOT NULL, - - Container VARCHAR(255) NULL, - - ContainerTag VARCHAR(255) NULL, - - FieldsToView VARCHAR(255) NULL, - - FilterSetting_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE UserSetting ( - - primaryKey UUID NOT NULL, - - AppName VARCHAR(256) NULL, - - UserName VARCHAR(512) NULL, - - UserGuid UUID NULL, - - ModuleName VARCHAR(1024) NULL, - - ModuleGuid UUID NULL, - - SettName VARCHAR(256) NULL, - - SettGuid UUID NULL, - - SettLastAccessTime TIMESTAMP(3) NULL, - - StrVal VARCHAR(256) NULL, - - TxtVal TEXT NULL, - - IntVal INT NULL, - - BoolVal BOOLEAN NULL, - - GuidVal UUID NULL, - - DecimalVal DECIMAL(20,10) NULL, - - DateTimeVal TIMESTAMP(3) NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE ApplicationLog ( - - primaryKey UUID NOT NULL, - - Category VARCHAR(64) NULL, - - EventId INT NULL, - - Priority INT NULL, - - Severity VARCHAR(32) NULL, - - Title VARCHAR(256) NULL, - - Timestamp TIMESTAMP(3) NULL, - - MachineName VARCHAR(32) NULL, - - AppDomainName VARCHAR(512) NULL, - - ProcessId VARCHAR(256) NULL, - - ProcessName VARCHAR(512) NULL, - - ThreadName VARCHAR(512) NULL, - - Win32ThreadId VARCHAR(128) NULL, - - Message VARCHAR(2500) NULL, - - FormattedMessage TEXT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuObjType ( - - primaryKey UUID NOT NULL, - - Name VARCHAR(255) NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuEntity ( - - primaryKey UUID NOT NULL, - - ObjectPrimaryKey VARCHAR(38) NOT NULL, - - OperationTime TIMESTAMP(3) NOT NULL, - - OperationType VARCHAR(100) NOT NULL, - - ExecutionResult VARCHAR(12) NOT NULL, - - Source VARCHAR(255) NOT NULL, - - SerializedField TEXT NULL, - - User_m0 UUID NOT NULL, - - ObjectType_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - -CREATE TABLE STORMAuField ( - - primaryKey UUID NOT NULL, - - Field VARCHAR(100) NOT NULL, - - OldValue TEXT NULL, - - NewValue TEXT NULL, - - MainChange_m0 UUID NULL, - - AuditEntity_m0 UUID NOT NULL, - - PRIMARY KEY (primaryKey)); - - - - - ALTER TABLE Лес ADD CONSTRAINT FKd3bd1222072f531605e73e66656fe58296c8bfd2 FOREIGN KEY (Страна) REFERENCES Страна; -CREATE INDEX Indexd3bd1222072f531605e73e66656fe58296c8bfd2 on Лес (Страна); - - ALTER TABLE Son ADD CONSTRAINT FKdabfac99e0885f846c9da12b79c4cbd7894842d3 FOREIGN KEY (Parent) REFERENCES Person; -CREATE INDEX Indexdabfac99e0885f846c9da12b79c4cbd7894842d3 on Son (Parent); - - ALTER TABLE Порода ADD CONSTRAINT FK2b114b4677a6ea52b53a26c9a20bbaad606eff78 FOREIGN KEY (ТипПороды_m0) REFERENCES ТипПороды; -CREATE INDEX Index2b114b4677a6ea52b53a26c9a20bbaad606eff78 on Порода (ТипПороды_m0); - - ALTER TABLE Порода ADD CONSTRAINT FK14420958a87702decd2090afa109ad90292eb458 FOREIGN KEY (Иерархия_m0) REFERENCES Порода; -CREATE INDEX Index14420958a87702decd2090afa109ad90292eb458 on Порода (Иерархия_m0); - - ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK04dbb0ac2005483472591018ab7522c499fe5b38 FOREIGN KEY (Parent) REFERENCES TestDetailWithCicle; -CREATE INDEX Index04dbb0ac2005483472591018ab7522c499fe5b38 on TestDetailWithCicle (Parent); - - ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FKf8067bbec7353839c222df5b7aeba4ce65c1655f FOREIGN KEY (TestMaster) REFERENCES TestMaster; -CREATE INDEX Indexf8067bbec7353839c222df5b7aeba4ce65c1655f on TestDetailWithCicle (TestMaster); - - ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FK53e2141b982788b2970c50d23073a5847e47d81c FOREIGN KEY (PanelAngle) REFERENCES LegoPanelAngle; -CREATE INDEX Index53e2141b982788b2970c50d23073a5847e47d81c on LegoBlockCustomPanel (PanelAngle); - - ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FKff526da3c540c5b99c203d0d93050c62ed29505f FOREIGN KEY (Block) REFERENCES LegoBlock; -CREATE INDEX Indexff526da3c540c5b99c203d0d93050c62ed29505f on LegoBlockCustomPanel (Block); - - ALTER TABLE Daughter ADD CONSTRAINT FK743208308d3826e12250804dbe77e02601e27402 FOREIGN KEY (Parent) REFERENCES Person; -CREATE INDEX Index743208308d3826e12250804dbe77e02601e27402 on Daughter (Parent); -CREATE INDEX Indexc5f9d71c0704ea7b966afcfdc89dc7eabe2d0c43 on КлассСМножТипов USING gist (PropertyGeography); - - ALTER TABLE Медведь ADD CONSTRAINT FK6d8033494746b0bb87ba367c83d273dfa11b8f59 FOREIGN KEY (Страна) REFERENCES Страна; -CREATE INDEX Index6d8033494746b0bb87ba367c83d273dfa11b8f59 on Медведь (Страна); - - ALTER TABLE Медведь ADD CONSTRAINT FK93be01a32cae64dc4b18705ade6683f41a32c367 FOREIGN KEY (ЛесОбитания) REFERENCES Лес; -CREATE INDEX Index93be01a32cae64dc4b18705ade6683f41a32c367 on Медведь (ЛесОбитания); - - ALTER TABLE Медведь ADD CONSTRAINT FK0b9f6ad0caded1971696ef6602e8a2831fa941b1 FOREIGN KEY (Мама) REFERENCES Медведь; -CREATE INDEX Index0b9f6ad0caded1971696ef6602e8a2831fa941b1 on Медведь (Мама); - - ALTER TABLE Медведь ADD CONSTRAINT FK0ca403a899ac5a709a19bbb9ada47b0060e5b819 FOREIGN KEY (Папа) REFERENCES Медведь; -CREATE INDEX Index0ca403a899ac5a709a19bbb9ada47b0060e5b819 on Медведь (Папа); - - ALTER TABLE Детейл ADD CONSTRAINT FKffdec7cb63189ed3e206c50c005f7daa0fe24f75 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; -CREATE INDEX Indexffdec7cb63189ed3e206c50c005f7daa0fe24f75 on Детейл (БазовыйКласс_m0); - - ALTER TABLE Детейл ADD CONSTRAINT FKafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; -CREATE INDEX Indexafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc on Детейл (БазовыйКласс_m1); -CREATE INDEX Index10d981ac5288ea278311b6a711b43fa954b635a8 on ДочернийКласс USING gist (PropertyGeography); - - ALTER TABLE Книга ADD CONSTRAINT FK899896abd3f04413fb054cc8507b69f51489a8bc FOREIGN KEY (Автор1) REFERENCES Автор; -CREATE INDEX Index899896abd3f04413fb054cc8507b69f51489a8bc on Книга (Автор1); - - ALTER TABLE Книга ADD CONSTRAINT FK84e4d9d5b6adc4bec48541216f15f396dd2b602c FOREIGN KEY (Библиотека1) REFERENCES Библиотека; -CREATE INDEX Index84e4d9d5b6adc4bec48541216f15f396dd2b602c on Книга (Библиотека1); - - ALTER TABLE LegoBlock ADD CONSTRAINT FK4cfb6296b76f57183c4e2ee17b66be5bed463d0f FOREIGN KEY (Material) REFERENCES LegoMaterial; -CREATE INDEX Index4cfb6296b76f57183c4e2ee17b66be5bed463d0f on LegoBlock (Material); - - ALTER TABLE LegoBlock ADD CONSTRAINT FK9f2f5e18e6674969f5e82da37bf4b5a2a1d4713a FOREIGN KEY (Color) REFERENCES LegoBlockColor; -CREATE INDEX Index9f2f5e18e6674969f5e82da37bf4b5a2a1d4713a on LegoBlock (Color); - - ALTER TABLE Перелом ADD CONSTRAINT FK6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa FOREIGN KEY (Лапа_m0) REFERENCES Лапа; -CREATE INDEX Index6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa on Перелом (Лапа_m0); - - ALTER TABLE LegoDevice ADD CONSTRAINT FKafee67e1a41c2550c0f3df3724edf1b0be74db9f FOREIGN KEY (Color) REFERENCES LegoBlockColor; -CREATE INDEX Indexafee67e1a41c2550c0f3df3724edf1b0be74db9f on LegoDevice (Color); - - ALTER TABLE Наследник ADD CONSTRAINT FK28ac1d61524a43a59e67af57a855ad487d1f8141 FOREIGN KEY (Мастер) REFERENCES Мастер; -CREATE INDEX Index28ac1d61524a43a59e67af57a855ad487d1f8141 on Наследник (Мастер); - - ALTER TABLE Наследник ADD CONSTRAINT FK0cb9ac2b0e7896223ed63c0c888c23aa86682b1e FOREIGN KEY (Master) REFERENCES Master; -CREATE INDEX Index0cb9ac2b0e7896223ed63c0c888c23aa86682b1e on Наследник (Master); - - ALTER TABLE Car ADD CONSTRAINT FKe86a1d047f4df342bf39a5af864aec2b40a3547a FOREIGN KEY (driver) REFERENCES Driver; -CREATE INDEX Indexe86a1d047f4df342bf39a5af864aec2b40a3547a on Car (driver); - - ALTER TABLE Мастер ADD CONSTRAINT FK0053148ab4597a6e8d749a7201b40246de6bba66 FOREIGN KEY (Мастер2) REFERENCES Мастер2; -CREATE INDEX Index0053148ab4597a6e8d749a7201b40246de6bba66 on Мастер (Мастер2); - - ALTER TABLE Блоха ADD CONSTRAINT FKb43131b348ee335105dd990a690720791b5dcba6 FOREIGN KEY (МедведьОбитания) REFERENCES Медведь; -CREATE INDEX Indexb43131b348ee335105dd990a690720791b5dcba6 on Блоха (МедведьОбитания); - - ALTER TABLE LegoPatent ADD CONSTRAINT FKe371de37f3b3ea04227552de1ee882c38df3f428 FOREIGN KEY (/BaseLegoBlock_m0) REFERENCES LegoBlock; -CREATE INDEX Indexe371de37f3b3ea04227552de1ee882c38df3f428 on LegoPatent (/BaseLegoBlock_m0); - - ALTER TABLE LegoPatent ADD CONSTRAINT FK2094cdf96c723881d619e851a1ab2d56ade718af FOREIGN KEY (/BaseLegoBlock_m1) REFERENCES LegoDevice; -CREATE INDEX Index2094cdf96c723881d619e851a1ab2d56ade718af on LegoPatent (/BaseLegoBlock_m1); - - ALTER TABLE Лапа ADD CONSTRAINT FK801cdef07db8852f60bd68a5a1fc42341cd641fa FOREIGN KEY (ТипЛапы_m0) REFERENCES ТипЛапы; -CREATE INDEX Index801cdef07db8852f60bd68a5a1fc42341cd641fa on Лапа (ТипЛапы_m0); - - ALTER TABLE Лапа ADD CONSTRAINT FKd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; -CREATE INDEX Indexd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 on Лапа (Кошка_m0); - - ALTER TABLE Берлога ADD CONSTRAINT FKa74603e81cb82d318a92d5d3e374895fe242d80e FOREIGN KEY (ЛесРасположения) REFERENCES Лес; -CREATE INDEX Indexa74603e81cb82d318a92d5d3e374895fe242d80e on Берлога (ЛесРасположения); - - ALTER TABLE Берлога ADD CONSTRAINT FK838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 FOREIGN KEY (Медведь) REFERENCES Медведь; -CREATE INDEX Index838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 on Берлога (Медведь); - - ALTER TABLE Котенок ADD CONSTRAINT FK79a0f583830fea7f95d716cc96a27d0967a2d537 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; -CREATE INDEX Index79a0f583830fea7f95d716cc96a27d0967a2d537 on Котенок (Кошка_m0); - - ALTER TABLE LegoBlockBottomPanel ADD CONSTRAINT FKba0e912f138a900a9d416b459d0b38e70871f043 FOREIGN KEY (Block) REFERENCES LegoBlock; -CREATE INDEX Indexba0e912f138a900a9d416b459d0b38e70871f043 on LegoBlockBottomPanel (Block); - - ALTER TABLE LegoBlockTopPanelHole ADD CONSTRAINT FKdeb8814715bfe1e7ac2e15c7346e05312d5a6a61 FOREIGN KEY (TopPanel) REFERENCES LegoBlockTopPanel; -CREATE INDEX Indexdeb8814715bfe1e7ac2e15c7346e05312d5a6a61 on LegoBlockTopPanelHole (TopPanel); - - ALTER TABLE Детейл2 ADD CONSTRAINT FKf07848a075b735870c7821349481da65acdab1ac FOREIGN KEY (Детейл_m0) REFERENCES Детейл; -CREATE INDEX Indexf07848a075b735870c7821349481da65acdab1ac on Детейл2 (Детейл_m0); - - ALTER TABLE Детейл2 ADD CONSTRAINT FKcf374070a402ac74a423ee1902b2348b95969951 FOREIGN KEY (Детейл_m1) REFERENCES ДетейлНаследник; -CREATE INDEX Indexcf374070a402ac74a423ee1902b2348b95969951 on Детейл2 (Детейл_m1); - - ALTER TABLE Журнал ADD CONSTRAINT FK51fce8ede8f7716be28b6975505b1f9e738cc71c FOREIGN KEY (Автор2) REFERENCES Автор; -CREATE INDEX Index51fce8ede8f7716be28b6975505b1f9e738cc71c on Журнал (Автор2); - - ALTER TABLE Журнал ADD CONSTRAINT FK93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 FOREIGN KEY (Библиотека2) REFERENCES Библиотека; -CREATE INDEX Index93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 on Журнал (Библиотека2); - - ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FK49d972c58446da0e86dfc1da2b8f54a4df9a37d0 FOREIGN KEY (SocketStandard) REFERENCES LegoSocketStandard; -CREATE INDEX Index49d972c58446da0e86dfc1da2b8f54a4df9a37d0 on LegoBlockTopPanel (SocketStandard); - - ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FKa1f8021b49abe4367a71a7f42c5e578c3326580a FOREIGN KEY (Block) REFERENCES LegoBlock; -CREATE INDEX Indexa1f8021b49abe4367a71a7f42c5e578c3326580a on LegoBlockTopPanel (Block); - - ALTER TABLE Кошка ADD CONSTRAINT FK271599c8f6730bbff77fe5e9bf61dbfd89e661c6 FOREIGN KEY (Порода_m0) REFERENCES Порода; -CREATE INDEX Index271599c8f6730bbff77fe5e9bf61dbfd89e661c6 on Кошка (Порода_m0); - - ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK5f71c50187d44a2fbbee65273ce3d50bdf1e0311 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; -CREATE INDEX Index5f71c50187d44a2fbbee65273ce3d50bdf1e0311 on ДетейлНаследник (БазовыйКласс_m0); - - ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK4c265a3e468425e25ea55c8344c1110b7cb4bde6 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; -CREATE INDEX Index4c265a3e468425e25ea55c8344c1110b7cb4bde6 on ДетейлНаследник (БазовыйКласс_m1); - - ALTER TABLE STORMWEBSEARCH ADD CONSTRAINT FKc4378e39870eb056aec84088683297a01d2a6200 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; - - ALTER TABLE STORMFILTERDETAIL ADD CONSTRAINT FK921d16269835017e2a0d0e29ad6fb175454a70d0 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; - - ALTER TABLE STORMFILTERLOOKUP ADD CONSTRAINT FKce38ef0db3f01a53acaa49fed8853fb941ad47ba FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; -CREATE INDEX Indexaa1a3fec50499d204c389473163d0d8f55d4aed9 on STORMAuEntity (ObjectPrimaryKey); -CREATE INDEX Indexaa1a3fec50499d204c389473163d0d8f55d4aed9 on STORMAuEntity (upper(ObjectPrimaryKey)); -CREATE INDEX Index969964c4b120bd7eebed319d77e182a5adf20816 on STORMAuEntity (OperationTime); -CREATE INDEX Index44feded66c1cee358e0db313bcaa06e5f8d8e549 on STORMAuEntity (User_m0); - - ALTER TABLE STORMAuEntity ADD CONSTRAINT FKb5725f55e665c6b660aff02c558b5ba413523eaa FOREIGN KEY (ObjectType_m0) REFERENCES STORMAuObjType; -CREATE INDEX Indexb5725f55e665c6b660aff02c558b5ba413523eaa on STORMAuEntity (ObjectType_m0); - - ALTER TABLE STORMAuField ADD CONSTRAINT FKf2cc121c707b1bf4290f2bb625d1d112b4919288 FOREIGN KEY (MainChange_m0) REFERENCES STORMAuField; - - ALTER TABLE STORMAuField ADD CONSTRAINT FK680dbb7e20a2404a7439d4de2d06d669f165bafe FOREIGN KEY (AuditEntity_m0) REFERENCES STORMAuEntity; -CREATE INDEX Index680dbb7e20a2404a7439d4de2d06d669f165bafe on STORMAuField (AuditEntity_m0); - + + + + + +CREATE TABLE LegoPanelAngle ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + Angle INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Driver ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + CarCount INT NULL, + + Documents BOOLEAN NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Страна ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Master ( + + primaryKey UUID NOT NULL, + + property VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Лес ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Площадь INT NULL, + + Заповедник BOOLEAN NULL, + + ДатаПослОсмотра TIMESTAMP(3) NULL, + + Страна UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Son ( + + primaryKey UUID NOT NULL, + + SuspendersColor VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Parent UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ТипПороды ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + ДатаРегистрации TIMESTAMP(3) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Порода ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + ТипПороды_m0 UUID NULL, + + Иерархия_m0 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE TestDetailWithCicle ( + + primaryKey UUID NOT NULL, + + TestDetailName VARCHAR(255) NULL, + + Parent UUID NULL, + + TestMaster UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockCustomPanel ( + + primaryKey UUID NOT NULL, + + Orientation VARCHAR(255) NULL, + + Position VARCHAR(255) NULL, + + PanelAngle UUID NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Daughter ( + + primaryKey UUID NOT NULL, + + DressColor VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Parent UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассСМножТипов ( + + primaryKey UUID NOT NULL, + + PropertyGeography GEOMETRY NULL, + + PropertyEnum VARCHAR(6) NULL, + + PropertyBool BOOLEAN NULL, + + PropertyInt INT NULL, + + PropertyDateTime TIMESTAMP(3) NULL, + + PropertyString VARCHAR(255) NULL, + + PropertyFloat REAL NULL, + + PropertyDouble DOUBLE PRECISION NULL, + + PropertyDecimal DECIMAL NULL, + + PropertySystemNullableDateTime TIMESTAMP(3) NULL, + + PropertySystemNullableInt INT NULL, + + PropertySystemNullableGuid UUID NULL, + + PropertySystemNullableDecimal DECIMAL NULL, + + PropStormnetNullableDateTime TIMESTAMP(3) NULL, + + PropertyStormnetNullableInt INT NULL, + + PropertyStormnetKeyGuid UUID NULL, + + PropStormnetNullableDecimal DECIMAL NULL, + + PropertyStormnetPartliedDate VARCHAR(255) NULL, + + PropertyStormnetContact TEXT NULL, + + PropertyStormnetBlob TEXT NULL, + + PropertyStormnetEvent TEXT NULL, + + PropertyStormnetGeoData TEXT NULL, + + PropertyStormnetImage TEXT NULL, + + PropertyStormnetWebFile TEXT NULL, + + PropertyStormnetFile TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Медведь ( + + primaryKey UUID NOT NULL, + + ПолеБС VARCHAR(255) NULL, + + ПорядковыйНомер INT NULL, + + Вес INT NULL, + + ЦветГлаз VARCHAR(255) NULL, + + Пол VARCHAR(9) NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + CreateTime TIMESTAMP(3) NULL, + + Creator VARCHAR(255) NULL, + + EditTime TIMESTAMP(3) NULL, + + Editor VARCHAR(255) NULL, + + Страна UUID NULL, + + ЛесОбитания UUID NULL, + + Мама UUID NULL, + + Папа UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockColor ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + ColorNumber INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Детейл ( + + primaryKey UUID NOT NULL, + + prop1 INT NULL, + + БазовыйКласс_m0 UUID NULL, + + БазовыйКласс_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ДочернийКласс ( + + primaryKey UUID NOT NULL, + + ChildProperty VARCHAR(255) NULL, + + PropertyGeography GEOMETRY NULL, + + PropertyEnum VARCHAR(6) NULL, + + PropertyBool BOOLEAN NULL, + + PropertyInt INT NULL, + + PropertyDateTime TIMESTAMP(3) NULL, + + PropertyString VARCHAR(255) NULL, + + PropertyFloat REAL NULL, + + PropertyDouble DOUBLE PRECISION NULL, + + PropertyDecimal DECIMAL NULL, + + PropertySystemNullableDateTime TIMESTAMP(3) NULL, + + PropertySystemNullableInt INT NULL, + + PropertySystemNullableGuid UUID NULL, + + PropertySystemNullableDecimal DECIMAL NULL, + + PropStormnetNullableDateTime TIMESTAMP(3) NULL, + + PropertyStormnetNullableInt INT NULL, + + PropertyStormnetKeyGuid UUID NULL, + + PropStormnetNullableDecimal DECIMAL NULL, + + PropertyStormnetPartliedDate VARCHAR(255) NULL, + + PropertyStormnetContact TEXT NULL, + + PropertyStormnetBlob TEXT NULL, + + PropertyStormnetEvent TEXT NULL, + + PropertyStormnetGeoData TEXT NULL, + + PropertyStormnetImage TEXT NULL, + + PropertyStormnetWebFile TEXT NULL, + + PropertyStormnetFile TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Книга ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Автор1 UUID NOT NULL, + + Библиотека1 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlock ( + + primaryKey UUID NOT NULL, + + Width INT NULL, + + Height INT NULL, + + Depth INT NULL, + + Configuration VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + BlockId INT NULL, + + Material UUID NULL, + + Color UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Person ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoSocketStandard ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Перелом ( + + primaryKey UUID NOT NULL, + + Дата TIMESTAMP(3) NULL, + + Тип VARCHAR(8) NULL, + + Лапа_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE БазовыйКласс ( + + primaryKey UUID NOT NULL, + + Свойство1 VARCHAR(255) NULL, + + Свойство2 INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ПоставщикКниг ( + + primaryKey UUID NOT NULL, + + Ссылка UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Мастер2 ( + + primaryKey UUID NOT NULL, + + свойство2 INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoDevice ( + + primaryKey UUID NOT NULL, + + Description VARCHAR(255) NULL, + + Electricity BOOLEAN NULL, + + Name VARCHAR(255) NULL, + + BlockId INT NULL, + + Color UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Наследник ( + + primaryKey UUID NOT NULL, + + Свойство DOUBLE PRECISION NULL, + + Свойство1 VARCHAR(255) NULL, + + Свойство2 INT NULL, + + Мастер UUID NULL, + + Master UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Car ( + + primaryKey UUID NOT NULL, + + Number VARCHAR(255) NULL, + + Model VARCHAR(255) NULL, + + TipCar VARCHAR(9) NULL, + + driver UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Мастер ( + + primaryKey UUID NOT NULL, + + prop VARCHAR(255) NULL, + + Мастер2 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Блоха ( + + primaryKey UUID NOT NULL, + + Кличка VARCHAR(255) NULL, + + МедведьОбитания UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoPatent ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + Date TIMESTAMP(3) NULL, + + Authors VARCHAR(255) NULL, + + Description VARCHAR(255) NULL, + + LegoBlock UUID NULL, + + LegoDevice UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Лапа ( + + primaryKey UUID NOT NULL, + + Цвет VARCHAR(255) NULL, + + Размер INT NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + БылиЛиПереломы BOOLEAN NULL, + + Сторона VARCHAR(11) NULL, + + Номер INT NULL, + + РазмерDouble DOUBLE PRECISION NULL, + + РазмерFloat REAL NULL, + + РазмерDecimal DECIMAL NULL, + + ТипЛапы_m0 UUID NULL, + + Кошка_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассСоСтрокКл ( + + StoragePrimaryKey VARCHAR(255) NOT NULL, + + PRIMARY KEY (StoragePrimaryKey)); + + + +CREATE TABLE Берлога ( + + primaryKey UUID NOT NULL, + + ПолеБС VARCHAR(255) NULL, + + Наименование VARCHAR(255) NULL, + + Комфортность INT NULL, + + Заброшена BOOLEAN NULL, + + Сертификат TEXT NULL, + + CertString TEXT NULL, + + ЛесРасположения UUID NULL, + + Медведь UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Автор ( + + primaryKey UUID NOT NULL, + + Имя VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE TestMaster ( + + primaryKey UUID NOT NULL, + + TestMasterName VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Котенок ( + + primaryKey UUID NOT NULL, + + КличкаКотенка VARCHAR(255) NULL, + + Глупость INT NULL, + + Кошка_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Библиотека ( + + primaryKey UUID NOT NULL, + + Адрес VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoMaterial ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockBottomPanel ( + + primaryKey UUID NOT NULL, + + WidthCount INT NULL, + + HeightCount INT NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockTopPanelHole ( + + primaryKey UUID NOT NULL, + + Position VARCHAR(255) NULL, + + TopPanel UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Детейл2 ( + + primaryKey UUID NOT NULL, + + prop2 VARCHAR(255) NULL, + + Детейл_m0 UUID NULL, + + Детейл_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Журнал ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Номер INT NULL, + + Автор2 UUID NOT NULL, + + Библиотека2 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE LegoBlockTopPanel ( + + primaryKey UUID NOT NULL, + + WidthCount INT NULL, + + HeightCount INT NULL, + + SocketStandard UUID NULL, + + Block UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ТипЛапы ( + + primaryKey UUID NOT NULL, + + Название VARCHAR(255) NULL, + + Актуально BOOLEAN NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE КлассStoredDerived ( + + primaryKey UUID NOT NULL, + + StrAttr2 VARCHAR(255) NULL, + + StrAttr VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE Кошка ( + + primaryKey UUID NOT NULL, + + Кличка VARCHAR(255) NULL, + + ДатаРождения TIMESTAMP(3) NULL, + + Тип VARCHAR(11) NULL, + + ПородаСтрокой VARCHAR(255) NULL, + + Агрессивная BOOLEAN NULL, + + УсыСлева INT NULL, + + УсыСправа INT NULL, + + Порода_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ДетейлНаследник ( + + primaryKey UUID NOT NULL, + + prop3 VARCHAR(255) NULL, + + prop1 INT NULL, + + БазовыйКласс_m0 UUID NULL, + + БазовыйКласс_m1 UUID NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMNETLOCKDATA ( + + LockKey VARCHAR(300) NOT NULL, + + UserName VARCHAR(300) NOT NULL, + + LockDate TIMESTAMP(3) NULL, + + PRIMARY KEY (LockKey)); + + + +CREATE TABLE STORMSETTINGS ( + + primaryKey UUID NOT NULL, + + Module VARCHAR(1000) NULL, + + Name VARCHAR(255) NULL, + + Value TEXT NULL, + + "User" VARCHAR(255) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAdvLimit ( + + primaryKey UUID NOT NULL, + + "User" VARCHAR(255) NULL, + + Published BOOLEAN NULL, + + Module VARCHAR(255) NULL, + + Name VARCHAR(255) NULL, + + Value TEXT NULL, + + HotKeyData INT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERSETTING ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + DataObjectView VARCHAR(255) NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMWEBSEARCH ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + "Order" INT NOT NULL, + + PresentView VARCHAR(255) NOT NULL, + + DetailedView VARCHAR(255) NOT NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERDETAIL ( + + primaryKey UUID NOT NULL, + + Caption VARCHAR(255) NOT NULL, + + DataObjectView VARCHAR(255) NOT NULL, + + ConnectMasterProp VARCHAR(255) NOT NULL, + + OwnerConnectProp VARCHAR(255) NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMFILTERLOOKUP ( + + primaryKey UUID NOT NULL, + + DataObjectType VARCHAR(255) NOT NULL, + + Container VARCHAR(255) NULL, + + ContainerTag VARCHAR(255) NULL, + + FieldsToView VARCHAR(255) NULL, + + FilterSetting_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE UserSetting ( + + primaryKey UUID NOT NULL, + + AppName VARCHAR(256) NULL, + + UserName VARCHAR(512) NULL, + + UserGuid UUID NULL, + + ModuleName VARCHAR(1024) NULL, + + ModuleGuid UUID NULL, + + SettName VARCHAR(256) NULL, + + SettGuid UUID NULL, + + SettLastAccessTime TIMESTAMP(3) NULL, + + StrVal VARCHAR(256) NULL, + + TxtVal TEXT NULL, + + IntVal INT NULL, + + BoolVal BOOLEAN NULL, + + GuidVal UUID NULL, + + DecimalVal DECIMAL(20,10) NULL, + + DateTimeVal TIMESTAMP(3) NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE ApplicationLog ( + + primaryKey UUID NOT NULL, + + Category VARCHAR(64) NULL, + + EventId INT NULL, + + Priority INT NULL, + + Severity VARCHAR(32) NULL, + + Title VARCHAR(256) NULL, + + Timestamp TIMESTAMP(3) NULL, + + MachineName VARCHAR(32) NULL, + + AppDomainName VARCHAR(512) NULL, + + ProcessId VARCHAR(256) NULL, + + ProcessName VARCHAR(512) NULL, + + ThreadName VARCHAR(512) NULL, + + Win32ThreadId VARCHAR(128) NULL, + + Message VARCHAR(2500) NULL, + + FormattedMessage TEXT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuObjType ( + + primaryKey UUID NOT NULL, + + Name VARCHAR(255) NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuEntity ( + + primaryKey UUID NOT NULL, + + ObjectPrimaryKey VARCHAR(38) NOT NULL, + + OperationTime TIMESTAMP(3) NOT NULL, + + OperationType VARCHAR(100) NOT NULL, + + ExecutionResult VARCHAR(12) NOT NULL, + + Source VARCHAR(255) NOT NULL, + + SerializedField TEXT NULL, + + User_m0 UUID NOT NULL, + + ObjectType_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + +CREATE TABLE STORMAuField ( + + primaryKey UUID NOT NULL, + + Field VARCHAR(100) NOT NULL, + + OldValue TEXT NULL, + + NewValue TEXT NULL, + + MainChange_m0 UUID NULL, + + AuditEntity_m0 UUID NOT NULL, + + PRIMARY KEY (primaryKey)); + + + + + ALTER TABLE Лес ADD CONSTRAINT FK157288d4eaf64bbfb67adbcb2075fa4a FOREIGN KEY (Страна) REFERENCES Страна; +CREATE INDEX Indexd3bd1222072f531605e73e66656fe58296c8bfd2 on Лес (Страна); + + ALTER TABLE Son ADD CONSTRAINT FK591a988367264dec8e0b539bf3a27668 FOREIGN KEY (Parent) REFERENCES Person; +CREATE INDEX Indexdabfac99e0885f846c9da12b79c4cbd7894842d3 on Son (Parent); + + ALTER TABLE Порода ADD CONSTRAINT FK59eaeb4d663b4848811150258de0d19d FOREIGN KEY (ТипПороды_m0) REFERENCES ТипПороды; +CREATE INDEX Index2b114b4677a6ea52b53a26c9a20bbaad606eff78 on Порода (ТипПороды_m0); + + ALTER TABLE Порода ADD CONSTRAINT FKe4d6f93777bc4488a33dcdb5ac5ac326 FOREIGN KEY (Иерархия_m0) REFERENCES Порода; +CREATE INDEX Index14420958a87702decd2090afa109ad90292eb458 on Порода (Иерархия_m0); + + ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK33618bf6577c4eb5846549a35b8cad2f FOREIGN KEY (Parent) REFERENCES TestDetailWithCicle; +CREATE INDEX Index04dbb0ac2005483472591018ab7522c499fe5b38 on TestDetailWithCicle (Parent); + + ALTER TABLE TestDetailWithCicle ADD CONSTRAINT FK660b9cb165a242938963ad5736da9987 FOREIGN KEY (TestMaster) REFERENCES TestMaster; +CREATE INDEX Indexf8067bbec7353839c222df5b7aeba4ce65c1655f on TestDetailWithCicle (TestMaster); + + ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FKd2703633d2c2491a844ae2c217e9a581 FOREIGN KEY (PanelAngle) REFERENCES LegoPanelAngle; +CREATE INDEX Index53e2141b982788b2970c50d23073a5847e47d81c on LegoBlockCustomPanel (PanelAngle); + + ALTER TABLE LegoBlockCustomPanel ADD CONSTRAINT FK5732cb16bd954414a9263ad04d958141 FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexff526da3c540c5b99c203d0d93050c62ed29505f on LegoBlockCustomPanel (Block); + + ALTER TABLE Daughter ADD CONSTRAINT FK167076390fb44b538625b92a974adb06 FOREIGN KEY (Parent) REFERENCES Person; +CREATE INDEX Index743208308d3826e12250804dbe77e02601e27402 on Daughter (Parent); +CREATE INDEX Indexc5f9d71c0704ea7b966afcfdc89dc7eabe2d0c43 on КлассСМножТипов USING gist (PropertyGeography); + + ALTER TABLE Медведь ADD CONSTRAINT FK0ab12cc5d7ff447b89812fd65417b140 FOREIGN KEY (Страна) REFERENCES Страна; +CREATE INDEX Index6d8033494746b0bb87ba367c83d273dfa11b8f59 on Медведь (Страна); + + ALTER TABLE Медведь ADD CONSTRAINT FK79a77b908b924630bc08a5719e6b50be FOREIGN KEY (ЛесОбитания) REFERENCES Лес; +CREATE INDEX Index93be01a32cae64dc4b18705ade6683f41a32c367 on Медведь (ЛесОбитания); + + ALTER TABLE Медведь ADD CONSTRAINT FK8e93bdaf1c7d45dda7a08ab69efb46c2 FOREIGN KEY (Мама) REFERENCES Медведь; +CREATE INDEX Index0b9f6ad0caded1971696ef6602e8a2831fa941b1 on Медведь (Мама); + + ALTER TABLE Медведь ADD CONSTRAINT FK2221bdb7cbc34984864b4a62e09320a7 FOREIGN KEY (Папа) REFERENCES Медведь; +CREATE INDEX Index0ca403a899ac5a709a19bbb9ada47b0060e5b819 on Медведь (Папа); + + ALTER TABLE Детейл ADD CONSTRAINT FK923566cb6a084c329f7d2acacd98f174 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; +CREATE INDEX Indexffdec7cb63189ed3e206c50c005f7daa0fe24f75 on Детейл (БазовыйКласс_m0); + + ALTER TABLE Детейл ADD CONSTRAINT FKa7336dd6f1ea480b904213a02bfabdb3 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; +CREATE INDEX Indexafd5bc7b595e3649b3c31ff899c0c8d3bd2219cc on Детейл (БазовыйКласс_m1); +CREATE INDEX Index10d981ac5288ea278311b6a711b43fa954b635a8 on ДочернийКласс USING gist (PropertyGeography); + + ALTER TABLE Книга ADD CONSTRAINT FKf633df113e654a6db7dbadac5e6a96da FOREIGN KEY (Автор1) REFERENCES Автор; +CREATE INDEX Index899896abd3f04413fb054cc8507b69f51489a8bc on Книга (Автор1); + + ALTER TABLE Книга ADD CONSTRAINT FK854a716c283040479578b54070ad4eb5 FOREIGN KEY (Библиотека1) REFERENCES Библиотека; +CREATE INDEX Index84e4d9d5b6adc4bec48541216f15f396dd2b602c on Книга (Библиотека1); + + ALTER TABLE LegoBlock ADD CONSTRAINT FKcd5f622d3293434daf6486250cc886de FOREIGN KEY (Material) REFERENCES LegoMaterial; +CREATE INDEX Index4cfb6296b76f57183c4e2ee17b66be5bed463d0f on LegoBlock (Material); + + ALTER TABLE LegoBlock ADD CONSTRAINT FKa94ea1ef9d0f4ae6a03e598afc7f50cf FOREIGN KEY (Color) REFERENCES LegoBlockColor; +CREATE INDEX Index9f2f5e18e6674969f5e82da37bf4b5a2a1d4713a on LegoBlock (Color); + + ALTER TABLE Перелом ADD CONSTRAINT FK5e03356919e8443ba43caec6decfb2ea FOREIGN KEY (Лапа_m0) REFERENCES Лапа; +CREATE INDEX Index6dee404d2bb9702d8d72537c5ae42a7c97dfb5fa on Перелом (Лапа_m0); + + ALTER TABLE LegoDevice ADD CONSTRAINT FK35ac24b8f55d4bc3b4c30a037afec198 FOREIGN KEY (Color) REFERENCES LegoBlockColor; +CREATE INDEX Indexafee67e1a41c2550c0f3df3724edf1b0be74db9f on LegoDevice (Color); + + ALTER TABLE Наследник ADD CONSTRAINT FK73a33a56a9db4d23b3edd7980d678f20 FOREIGN KEY (Мастер) REFERENCES Мастер; +CREATE INDEX Index28ac1d61524a43a59e67af57a855ad487d1f8141 on Наследник (Мастер); + + ALTER TABLE Наследник ADD CONSTRAINT FK05604bae8988472a9f6a0160d2669f2d FOREIGN KEY (Master) REFERENCES Master; +CREATE INDEX Index0cb9ac2b0e7896223ed63c0c888c23aa86682b1e on Наследник (Master); + + ALTER TABLE Car ADD CONSTRAINT FK8820c93ffe4b4fc79cf93f17420c2ca5 FOREIGN KEY (driver) REFERENCES Driver; +CREATE INDEX Indexe86a1d047f4df342bf39a5af864aec2b40a3547a on Car (driver); + + ALTER TABLE Мастер ADD CONSTRAINT FK5fbf5b67b43f475aa0af523e48ad5c52 FOREIGN KEY (Мастер2) REFERENCES Мастер2; +CREATE INDEX Index0053148ab4597a6e8d749a7201b40246de6bba66 on Мастер (Мастер2); + + ALTER TABLE Блоха ADD CONSTRAINT FKc8b16acd02404f5195d98cec9a2eef3b FOREIGN KEY (МедведьОбитания) REFERENCES Медведь; +CREATE INDEX Indexb43131b348ee335105dd990a690720791b5dcba6 on Блоха (МедведьОбитания); + + ALTER TABLE LegoPatent ADD CONSTRAINT FK9cfdab44ae544a2392df6c879604bf8c FOREIGN KEY (LegoBlock) REFERENCES LegoBlock; +CREATE INDEX Index849bc80cb1cf2d804429cfd10a756cb914e3fece on LegoPatent (LegoBlock); + + ALTER TABLE LegoPatent ADD CONSTRAINT FKa04432c6fd544677a1b19a648b524d8e FOREIGN KEY (LegoDevice) REFERENCES LegoDevice; +CREATE INDEX Index935a233bb659ed7d9c097089601b6ef70a1dc6df on LegoPatent (LegoDevice); + + ALTER TABLE Лапа ADD CONSTRAINT FKb94f432b705f4fc6991cd1aab6ad65f1 FOREIGN KEY (ТипЛапы_m0) REFERENCES ТипЛапы; +CREATE INDEX Index801cdef07db8852f60bd68a5a1fc42341cd641fa on Лапа (ТипЛапы_m0); + + ALTER TABLE Лапа ADD CONSTRAINT FK846dc9bf967442f5a85940594c7959f8 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; +CREATE INDEX Indexd2c2995f4deb3767b25fa4ca17d61bf9bff3d562 on Лапа (Кошка_m0); + + ALTER TABLE Берлога ADD CONSTRAINT FKc2709eb2d6874fa89862f667540fd80f FOREIGN KEY (ЛесРасположения) REFERENCES Лес; +CREATE INDEX Indexa74603e81cb82d318a92d5d3e374895fe242d80e on Берлога (ЛесРасположения); + + ALTER TABLE Берлога ADD CONSTRAINT FK1f260f70167d47438f738925a8287890 FOREIGN KEY (Медведь) REFERENCES Медведь; +CREATE INDEX Index838e30a686c4f1dcfbb02e55d47218e48ddbe7a2 on Берлога (Медведь); + + ALTER TABLE Котенок ADD CONSTRAINT FKd61230cda1ce42dea4a12e3a51526845 FOREIGN KEY (Кошка_m0) REFERENCES Кошка; +CREATE INDEX Index79a0f583830fea7f95d716cc96a27d0967a2d537 on Котенок (Кошка_m0); + + ALTER TABLE LegoBlockBottomPanel ADD CONSTRAINT FK02ed28f02f144a98845a958962102cc8 FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexba0e912f138a900a9d416b459d0b38e70871f043 on LegoBlockBottomPanel (Block); + + ALTER TABLE LegoBlockTopPanelHole ADD CONSTRAINT FKf768898b17b743d9a63fd2d04c736963 FOREIGN KEY (TopPanel) REFERENCES LegoBlockTopPanel; +CREATE INDEX Indexdeb8814715bfe1e7ac2e15c7346e05312d5a6a61 on LegoBlockTopPanelHole (TopPanel); + + ALTER TABLE Детейл2 ADD CONSTRAINT FK022a6378aa5c4b27acbd11616bd04476 FOREIGN KEY (Детейл_m0) REFERENCES Детейл; +CREATE INDEX Indexf07848a075b735870c7821349481da65acdab1ac on Детейл2 (Детейл_m0); + + ALTER TABLE Детейл2 ADD CONSTRAINT FKd6a50786d5fa43c497b5f58d4c1dccd8 FOREIGN KEY (Детейл_m1) REFERENCES ДетейлНаследник; +CREATE INDEX Indexcf374070a402ac74a423ee1902b2348b95969951 on Детейл2 (Детейл_m1); + + ALTER TABLE Журнал ADD CONSTRAINT FKffb609bc1203460ea083045acc6cf87d FOREIGN KEY (Автор2) REFERENCES Автор; +CREATE INDEX Index51fce8ede8f7716be28b6975505b1f9e738cc71c on Журнал (Автор2); + + ALTER TABLE Журнал ADD CONSTRAINT FK9a0b356d87d74eea901c75f734c97f0c FOREIGN KEY (Библиотека2) REFERENCES Библиотека; +CREATE INDEX Index93c8f6bdc15c74cea64c3d56754d8263c4f0ceb5 on Журнал (Библиотека2); + + ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FK211491cf9d8d4da698bffe2230235117 FOREIGN KEY (SocketStandard) REFERENCES LegoSocketStandard; +CREATE INDEX Index49d972c58446da0e86dfc1da2b8f54a4df9a37d0 on LegoBlockTopPanel (SocketStandard); + + ALTER TABLE LegoBlockTopPanel ADD CONSTRAINT FKfdf663e9075e405fb494ce62236fd845 FOREIGN KEY (Block) REFERENCES LegoBlock; +CREATE INDEX Indexa1f8021b49abe4367a71a7f42c5e578c3326580a on LegoBlockTopPanel (Block); + + ALTER TABLE Кошка ADD CONSTRAINT FK96c7b526967c40de9b46446b72d55a0d FOREIGN KEY (Порода_m0) REFERENCES Порода; +CREATE INDEX Index271599c8f6730bbff77fe5e9bf61dbfd89e661c6 on Кошка (Порода_m0); + + ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK043edf55e74f4884b658db2c29cc20e9 FOREIGN KEY (БазовыйКласс_m0) REFERENCES БазовыйКласс; +CREATE INDEX Index5f71c50187d44a2fbbee65273ce3d50bdf1e0311 on ДетейлНаследник (БазовыйКласс_m0); + + ALTER TABLE ДетейлНаследник ADD CONSTRAINT FK75dc70e3100348278829b09878717143 FOREIGN KEY (БазовыйКласс_m1) REFERENCES Наследник; +CREATE INDEX Index4c265a3e468425e25ea55c8344c1110b7cb4bde6 on ДетейлНаследник (БазовыйКласс_m1); + + ALTER TABLE STORMWEBSEARCH ADD CONSTRAINT FKf2814f935401433ab00725ed790be71f FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; + + ALTER TABLE STORMFILTERDETAIL ADD CONSTRAINT FKc1850f8ae71b43c18065af8b3899bf8a FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; + + ALTER TABLE STORMFILTERLOOKUP ADD CONSTRAINT FK658f79f07f904608aa98b03582c313c5 FOREIGN KEY (FilterSetting_m0) REFERENCES STORMFILTERSETTING; + + ALTER TABLE STORMAuEntity ADD CONSTRAINT FK6ea8300d794e42758d1cb3ee166aa092 FOREIGN KEY (ObjectType_m0) REFERENCES STORMAuObjType; + + ALTER TABLE STORMAuField ADD CONSTRAINT FK122112fb319548a9930ff994de6e17e2 FOREIGN KEY (MainChange_m0) REFERENCES STORMAuField; + + ALTER TABLE STORMAuField ADD CONSTRAINT FK43ce00da26154e06954d4ddcddf5aa0e FOREIGN KEY (AuditEntity_m0) REFERENCES STORMAuEntity; + diff --git a/Tests/Objects/LegoBlock.cs b/Tests/Objects/LegoBlock.cs index 48d74c03..54262825 100644 --- a/Tests/Objects/LegoBlock.cs +++ b/Tests/Objects/LegoBlock.cs @@ -37,7 +37,7 @@ public class LegoBlock : NewPlatform.Flexberry.ORM.ODataService.Tests.BaseLegoBl private int fHeight; - private int fTop; + private int fDepth; private string fConfiguration; @@ -117,33 +117,33 @@ public virtual int Height } /// - /// Top. + /// Depth. /// - // *** Start programmer edit section *** (LegoBlock.Top CustomAttributes) + // *** Start programmer edit section *** (LegoBlock.Depth CustomAttributes) - // *** End programmer edit section *** (LegoBlock.Top CustomAttributes) - public virtual int Top + // *** End programmer edit section *** (LegoBlock.Depth CustomAttributes) + public virtual int Depth { get { - // *** Start programmer edit section *** (LegoBlock.Top Get start) + // *** Start programmer edit section *** (LegoBlock.Depth Get start) - // *** End programmer edit section *** (LegoBlock.Top Get start) - int result = this.fTop; - // *** Start programmer edit section *** (LegoBlock.Top Get end) + // *** End programmer edit section *** (LegoBlock.Depth Get start) + int result = this.fDepth; + // *** Start programmer edit section *** (LegoBlock.Depth Get end) - // *** End programmer edit section *** (LegoBlock.Top Get end) + // *** End programmer edit section *** (LegoBlock.Depth Get end) return result; } set { - // *** Start programmer edit section *** (LegoBlock.Top Set start) + // *** Start programmer edit section *** (LegoBlock.Depth Set start) - // *** End programmer edit section *** (LegoBlock.Top Set start) - this.fTop = value; - // *** Start programmer edit section *** (LegoBlock.Top Set end) + // *** End programmer edit section *** (LegoBlock.Depth Set start) + this.fDepth = value; + // *** Start programmer edit section *** (LegoBlock.Depth Set end) - // *** End programmer edit section *** (LegoBlock.Top Set end) + // *** End programmer edit section *** (LegoBlock.Depth Set end) } } diff --git a/Tests/Objects/LegoPatent.cs b/Tests/Objects/LegoPatent.cs index 7925ec4a..fa168fa8 100644 --- a/Tests/Objects/LegoPatent.cs +++ b/Tests/Objects/LegoPatent.cs @@ -182,7 +182,9 @@ public virtual string Description // *** End programmer edit section *** (LegoPatent.BaseLegoBlock CustomAttributes) [Agregator()] [NotNull()] - [PropertyStorage("/BaseLegoBlock")] + [PropertyStorage(new string[] { + "LegoBlock", + "LegoDevice"})] [TypeUsage(new string[] { "NewPlatform.Flexberry.ORM.ODataService.Tests.LegoBlock", "NewPlatform.Flexberry.ORM.ODataService.Tests.LegoDevice"})] From 2fe71d1c79e8f00846b0d615829555fbaa880c59 Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Tue, 30 Mar 2021 13:13:20 +0500 Subject: [PATCH 4/7] Update test --- .../CRUD/Update/ModifyDataTest.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs index a3faa723..b9c1d902 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs @@ -1619,7 +1619,16 @@ 4. Сохраняются детейлы LegoBlockTopPanelHole 5. Сохраняются детейлы LegoPatent */ + LegoSocketStandard legoSocketStandard = new LegoSocketStandard() { Name = "Базовый" }; + args.DataService.UpdateObject(legoSocketStandard); + LegoBlock legoBlock = new LegoBlock() { Name = "Прямоугольник" }; + + legoBlock.SetExistObjectPrimaryKey(KeyGuid.NewGuid()); + legoBlock.InitDataCopy(); + + legoBlock.Name = "Квадрат"; + View legoBlockView = new View() { DefineClassType = typeof(LegoBlock), Name = "V" }; legoBlockView.AddProperty(nameof(LegoBlock.__PrimaryKey)); legoBlockView.AddProperty(nameof(LegoBlock.Name)); @@ -1636,7 +1645,7 @@ 5. Сохраняются детейлы LegoPatent det1Json.Add($"{nameof(LegoBlockBottomPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); legoBlockBottomPanelJson = det1Json.Serialize(); - LegoBlockTopPanel legoBlockTopPanel = new LegoBlockTopPanel() { HeightCount = 3, WidthCount = 3 }; + LegoBlockTopPanel legoBlockTopPanel = new LegoBlockTopPanel() { HeightCount = 3, WidthCount = 3, SocketStandard = legoSocketStandard }; legoBlock.TopPanels.Add(legoBlockTopPanel); View legoBlockTopPanelView = new View() { DefineClassType = typeof(LegoBlockTopPanel), Name = "V" }; legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.__PrimaryKey)); @@ -1645,6 +1654,7 @@ 5. Сохраняются детейлы LegoPatent var legoBlockTopPanelJson = legoBlockTopPanel.ToJson(legoBlockTopPanelView, args.Token.Model); DataObjectDictionary det2Json = DataObjectDictionary.Parse(legoBlockTopPanelJson, legoBlockTopPanelView, args.Token.Model); det2Json.Add($"{nameof(LegoBlockTopPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + det2Json.Add($"{nameof(LegoBlockTopPanel.SocketStandard)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoSocketStandard)).Name}({((KeyGuid)legoSocketStandard.__PrimaryKey).Guid:D})"); legoBlockTopPanelJson = det2Json.Serialize(); LegoBlockTopPanelHole legoBlockTopPanelHole = new LegoBlockTopPanelHole() { Position = "Центр" }; @@ -1674,10 +1684,6 @@ 5. Сохраняются детейлы LegoPatent string[] changesets = new[] { - CreateChangeset( - $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}", - legoBlockJson, - legoBlock), CreateChangeset( $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockBottomPanel)).Name}", legoBlockBottomPanelJson, @@ -1694,11 +1700,15 @@ 5. Сохраняются детейлы LegoPatent $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoPatent)).Name}", legoPatentJson, legoPatent), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}", + legoBlockJson, + legoBlock), }; HttpRequestMessage batchRequest = CreateBatchRequest(baseUrl, changesets); using (HttpResponseMessage response = args.HttpClient.SendAsync(batchRequest).Result) { - CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created }); + CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.OK }); } }); } From c8184182ac373aa46f824143c06d79cb37b3995f Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Tue, 30 Mar 2021 16:31:42 +0500 Subject: [PATCH 5/7] Update test --- .../CRUD/Update/ModifyDataTest.cs | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs index b9c1d902..b8d27370 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs @@ -1622,7 +1622,18 @@ 5. Сохраняются детейлы LegoPatent LegoSocketStandard legoSocketStandard = new LegoSocketStandard() { Name = "Базовый" }; args.DataService.UpdateObject(legoSocketStandard); - LegoBlock legoBlock = new LegoBlock() { Name = "Прямоугольник" }; + LegoBlockColor legoBlockColor = new LegoBlockColor() { Name = "Оранжевый" }; + legoBlockColor.SetExistObjectPrimaryKey(KeyGuid.NewGuid()); + legoBlockColor.InitDataCopy(); + + legoBlockColor.Name = "Рыжий"; + + View legoBlockColorView = new View() { DefineClassType = typeof(LegoBlockColor), Name = "V" }; + legoBlockColorView.AddProperty(nameof(LegoBlockColor.__PrimaryKey)); + legoBlockColorView.AddProperty(nameof(LegoBlockColor.Name)); + var legoBlockColorJson = legoBlockColor.ToJson(legoBlockColorView, args.Token.Model); + + LegoBlock legoBlock = new LegoBlock() { Name = "Прямоугольник", Color = legoBlockColor }; legoBlock.SetExistObjectPrimaryKey(KeyGuid.NewGuid()); legoBlock.InitDataCopy(); @@ -1688,14 +1699,18 @@ 5. Сохраняются детейлы LegoPatent $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockBottomPanel)).Name}", legoBlockBottomPanelJson, legoBlockBottomPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", + legoBlockTopPanelHoleJson, + legoBlockTopPanelHole), CreateChangeset( $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}", legoBlockTopPanelJson, legoBlockTopPanel), CreateChangeset( - $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", - legoBlockTopPanelHoleJson, - legoBlockTopPanelHole), + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockColor)).Name}", + legoBlockColorJson, + legoBlockColor), CreateChangeset( $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoPatent)).Name}", legoPatentJson, @@ -1708,7 +1723,7 @@ 5. Сохраняются детейлы LegoPatent HttpRequestMessage batchRequest = CreateBatchRequest(baseUrl, changesets); using (HttpResponseMessage response = args.HttpClient.SendAsync(batchRequest).Result) { - CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.OK }); + CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.OK, HttpStatusCode.Created, HttpStatusCode.OK }); } }); } From b2f9a9b2ca77beb8cb6b6cf20c4a02249b2986b1 Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Fri, 2 Apr 2021 12:37:56 +0500 Subject: [PATCH 6/7] Update test --- .../CRUD/Update/ModifyDataTest.cs | 52 +++++++++++++++---- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs index b8d27370..71b864c6 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs @@ -1668,15 +1668,22 @@ 5. Сохраняются детейлы LegoPatent det2Json.Add($"{nameof(LegoBlockTopPanel.SocketStandard)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoSocketStandard)).Name}({((KeyGuid)legoSocketStandard.__PrimaryKey).Guid:D})"); legoBlockTopPanelJson = det2Json.Serialize(); - LegoBlockTopPanelHole legoBlockTopPanelHole = new LegoBlockTopPanelHole() { Position = "Центр" }; - legoBlockTopPanel.Holes.Add(legoBlockTopPanelHole); + LegoBlockTopPanelHole legoBlockTopPanelHoleFirst = new LegoBlockTopPanelHole() { Position = "Центр" }; + legoBlockTopPanel.Holes.Add(legoBlockTopPanelHoleFirst); View legoBlockTopPanelHoleView = new View() { DefineClassType = typeof(LegoBlockTopPanelHole), Name = "V" }; legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.__PrimaryKey)); legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.Position)); - var legoBlockTopPanelHoleJson = legoBlockTopPanelHole.ToJson(legoBlockTopPanelHoleView, args.Token.Model); - DataObjectDictionary det3Json = DataObjectDictionary.Parse(legoBlockTopPanelHoleJson, legoBlockTopPanelHoleView, args.Token.Model); + var legoBlockTopPanelHoleFirstJson = legoBlockTopPanelHoleFirst.ToJson(legoBlockTopPanelHoleView, args.Token.Model); + DataObjectDictionary det3Json = DataObjectDictionary.Parse(legoBlockTopPanelHoleFirstJson, legoBlockTopPanelHoleView, args.Token.Model); det3Json.Add($"{nameof(LegoBlockTopPanelHole.TopPanel)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}({((KeyGuid)legoBlockTopPanel.__PrimaryKey).Guid:D})"); - legoBlockTopPanelHoleJson = det3Json.Serialize(); + legoBlockTopPanelHoleFirstJson = det3Json.Serialize(); + + LegoBlockTopPanelHole legoBlockTopPanelHoleSecond = new LegoBlockTopPanelHole() { Position = "Бок" }; + legoBlockTopPanel.Holes.Add(legoBlockTopPanelHoleSecond); + var legoBlockTopPanelHoleSecondJson = legoBlockTopPanelHoleSecond.ToJson(legoBlockTopPanelHoleView, args.Token.Model); + det3Json = DataObjectDictionary.Parse(legoBlockTopPanelHoleSecondJson, legoBlockTopPanelHoleView, args.Token.Model); + det3Json.Add($"{nameof(LegoBlockTopPanelHole.TopPanel)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}({((KeyGuid)legoBlockTopPanel.__PrimaryKey).Guid:D})"); + legoBlockTopPanelHoleSecondJson = det3Json.Serialize(); LegoPatent legoPatent = new LegoPatent() { Authors = "Phill", Date = DateTime.Now, Name = "Кубики с пимпочками и дырками", Description = "Вот" }; legoBlock.Patents.Add(legoPatent); @@ -1699,14 +1706,18 @@ 5. Сохраняются детейлы LegoPatent $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockBottomPanel)).Name}", legoBlockBottomPanelJson, legoBlockBottomPanel), - CreateChangeset( - $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", - legoBlockTopPanelHoleJson, - legoBlockTopPanelHole), CreateChangeset( $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}", legoBlockTopPanelJson, legoBlockTopPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", + legoBlockTopPanelHoleFirstJson, + legoBlockTopPanelHoleFirst), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", + legoBlockTopPanelHoleSecondJson, + legoBlockTopPanelHoleSecond), CreateChangeset( $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockColor)).Name}", legoBlockColorJson, @@ -1723,7 +1734,28 @@ 5. Сохраняются детейлы LegoPatent HttpRequestMessage batchRequest = CreateBatchRequest(baseUrl, changesets); using (HttpResponseMessage response = args.HttpClient.SendAsync(batchRequest).Result) { - CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.OK, HttpStatusCode.Created, HttpStatusCode.OK }); + CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.Created, HttpStatusCode.OK, HttpStatusCode.Created, HttpStatusCode.OK }); + + legoBlockView.AddDetailInView(nameof(LegoBlock.Patents), legoPatentView, true); + legoBlockView.AddDetailInView(nameof(LegoBlock.TopPanels), legoBlockTopPanelView, true); + legoBlockView.AddDetailInView(nameof(LegoBlock.BottomPanels), legoBlockBottomPanelView, true); + legoBlockTopPanelView.AddDetailInView(nameof(LegoBlockTopPanel.Holes), legoBlockTopPanelHoleView, true); + + legoBlock.TopPanels.Clear(); + + args.DataService.LoadObject(legoBlockView, legoBlock, true, true); + + Assert.Equal(legoPatent.Authors, legoBlock.Patents[0].Authors); + Assert.Equal(legoPatent.Name, legoBlock.Patents[0].Name); + Assert.Equal(legoPatent.Description, legoBlock.Patents[0].Description); + + Assert.Equal(legoBlockBottomPanel.HeightCount, legoBlock.BottomPanels[0].HeightCount); + Assert.Equal(legoBlockBottomPanel.WidthCount, legoBlock.BottomPanels[0].WidthCount); + + Assert.Equal(legoBlockTopPanel.HeightCount, legoBlock.TopPanels[0].HeightCount); + Assert.Equal(legoBlockTopPanel.WidthCount, legoBlock.TopPanels[0].WidthCount); + + Assert.Equal(2, legoBlock.TopPanels[0].Holes.Count); } }); } From 11a04321d8d41f8c00d3f91e7e3b4e9600a30be9 Mon Sep 17 00:00:00 2001 From: Bratchikov Igor Date: Mon, 5 Apr 2021 23:04:17 +0500 Subject: [PATCH 7/7] Update tests --- .../CRUD/Update/ModifyDataTest.cs | 185 +++++++++++++++++- 1 file changed, 175 insertions(+), 10 deletions(-) diff --git a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs index 71b864c6..e7fdbdd8 100644 --- a/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs +++ b/Tests/NewPlatform.Flexberry.ORM.ODataService.Tests/CRUD/Update/ModifyDataTest.cs @@ -1604,21 +1604,13 @@ public void UpdateDetailAndDetailTest() } /// - /// Test batch update detail with inheritance. + /// Test batch update for insert detail with inheritance. /// [Fact] - public void UpdateInheritanceDetailTest() + public void BatchInsertInheritanceDetailTest() { ActODataService(args => { - /* - 1. Сохраняется новый LegoBlock - 2. с детейлами LegoBlockBottomPanel - 3. Сохраняется детейл LegoBlockTopPanel - 4. Сохраняются детейлы LegoBlockTopPanelHole - 5. Сохраняются детейлы LegoPatent - */ - LegoSocketStandard legoSocketStandard = new LegoSocketStandard() { Name = "Базовый" }; args.DataService.UpdateObject(legoSocketStandard); @@ -1759,5 +1751,178 @@ 5. Сохраняются детейлы LegoPatent } }); } + + /// + /// Test batch update detail with inheritance. + /// + [Fact] + public void UpdateInheritanceDetailTest() + { + ActODataService(args => + { + // Arrange. + LegoSocketStandard legoSocketStandard = new LegoSocketStandard() { Name = "Базовый" }; + args.DataService.UpdateObject(legoSocketStandard); + + LegoBlockColor legoBlockColor = new LegoBlockColor() { Name = "Оранжевый" }; + + args.DataService.UpdateObject(legoBlockColor); + + legoBlockColor.Name = "Рыжий"; + + View legoBlockColorView = new View() { DefineClassType = typeof(LegoBlockColor), Name = "V" }; + legoBlockColorView.AddProperty(nameof(LegoBlockColor.__PrimaryKey)); + legoBlockColorView.AddProperty(nameof(LegoBlockColor.Name)); + var legoBlockColorJson = legoBlockColor.ToJson(legoBlockColorView, args.Token.Model); + + LegoBlock legoBlock = new LegoBlock() { Name = "Прямоугольник", Color = legoBlockColor }; + + LegoBlockBottomPanel legoBlockBottomPanel = new LegoBlockBottomPanel() { HeightCount = 2, WidthCount = 2 }; + legoBlock.BottomPanels.Add(legoBlockBottomPanel); + + LegoBlockTopPanel legoBlockTopPanel = new LegoBlockTopPanel() { HeightCount = 3, WidthCount = 3, SocketStandard = legoSocketStandard }; + legoBlock.TopPanels.Add(legoBlockTopPanel); + + LegoBlockTopPanelHole legoBlockTopPanelHoleFirst = new LegoBlockTopPanelHole() { Position = "Центр" }; + legoBlockTopPanel.Holes.Add(legoBlockTopPanelHoleFirst); + + LegoBlockCustomPanel legoBlockCustomPanel = new LegoBlockCustomPanel() { Position = "Слева" }; + legoBlock.CustomPanels.Add(legoBlockCustomPanel); + + LegoPatent legoPatent = new LegoPatent() { Authors = "Phill", Date = DateTime.Now, Name = "Кубики с пимпочками и дырками", Description = "Вот" }; + legoBlock.Patents.Add(legoPatent); + + args.DataService.UpdateObject(legoBlock); + + legoBlock.Name = "Квадрат"; + legoBlockBottomPanel.HeightCount = 4; + legoBlockBottomPanel.WidthCount = 4; + legoBlockTopPanel.HeightCount = 5; + legoBlockTopPanel.WidthCount = 5; + legoBlockTopPanelHoleFirst.Position = "Внизу"; + legoBlockCustomPanel.Position = "Вверху"; + legoPatent.Authors = "Rob"; + + View legoBlockView = new View() { DefineClassType = typeof(LegoBlock), Name = "V" }; + legoBlockView.AddProperty(nameof(LegoBlock.__PrimaryKey)); + legoBlockView.AddProperty(nameof(LegoBlock.Name)); + var legoBlockJson = legoBlock.ToJson(legoBlockView, args.Token.Model); + + View legoBlockBottomPanelView = new View() { DefineClassType = typeof(LegoBlockBottomPanel), Name = "V" }; + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.__PrimaryKey)); + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.HeightCount)); + legoBlockBottomPanelView.AddProperty(nameof(LegoBlockBottomPanel.WidthCount)); + var legoBlockBottomPanelJson = legoBlockBottomPanel.ToJson(legoBlockBottomPanelView, args.Token.Model); + DataObjectDictionary det1Json = DataObjectDictionary.Parse(legoBlockBottomPanelJson, legoBlockBottomPanelView, args.Token.Model); + det1Json.Add($"{nameof(LegoBlockBottomPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoBlockBottomPanelJson = det1Json.Serialize(); + + View legoBlockTopPanelView = new View() { DefineClassType = typeof(LegoBlockTopPanel), Name = "V" }; + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.__PrimaryKey)); + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.HeightCount)); + legoBlockTopPanelView.AddProperty(nameof(LegoBlockTopPanel.WidthCount)); + var legoBlockTopPanelJson = legoBlockTopPanel.ToJson(legoBlockTopPanelView, args.Token.Model); + DataObjectDictionary det2Json = DataObjectDictionary.Parse(legoBlockTopPanelJson, legoBlockTopPanelView, args.Token.Model); + det2Json.Add($"{nameof(LegoBlockTopPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + det2Json.Add($"{nameof(LegoBlockTopPanel.SocketStandard)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoSocketStandard)).Name}({((KeyGuid)legoSocketStandard.__PrimaryKey).Guid:D})"); + legoBlockTopPanelJson = det2Json.Serialize(); + + View legoBlockTopPanelHoleView = new View() { DefineClassType = typeof(LegoBlockTopPanelHole), Name = "V" }; + legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.__PrimaryKey)); + legoBlockTopPanelHoleView.AddProperty(nameof(LegoBlockTopPanelHole.Position)); + var legoBlockTopPanelHoleFirstJson = legoBlockTopPanelHoleFirst.ToJson(legoBlockTopPanelHoleView, args.Token.Model); + DataObjectDictionary det3Json = DataObjectDictionary.Parse(legoBlockTopPanelHoleFirstJson, legoBlockTopPanelHoleView, args.Token.Model); + det3Json.Add($"{nameof(LegoBlockTopPanelHole.TopPanel)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}({((KeyGuid)legoBlockTopPanel.__PrimaryKey).Guid:D})"); + legoBlockTopPanelHoleFirstJson = det3Json.Serialize(); + + View legoBlockCustomPanelView = new View() { DefineClassType = typeof(LegoBlockCustomPanel), Name = "V" }; + legoBlockCustomPanelView.AddProperty(nameof(LegoBlockCustomPanel.__PrimaryKey)); + legoBlockCustomPanelView.AddProperty(nameof(LegoBlockCustomPanel.Position)); + var legoBlockCustomPanelJson = legoBlockCustomPanel.ToJson(legoBlockCustomPanelView, args.Token.Model); + DataObjectDictionary det4Json = DataObjectDictionary.Parse(legoBlockCustomPanelJson, legoBlockCustomPanelView, args.Token.Model); + det4Json.Add($"{nameof(LegoBlockCustomPanel.Block)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoBlockCustomPanelJson = det4Json.Serialize(); + + View legoPatentView = new View() { DefineClassType = typeof(LegoPatent), Name = "V" }; + legoPatentView.AddProperty(nameof(LegoPatent.__PrimaryKey)); + legoPatentView.AddProperty(nameof(LegoPatent.Authors)); + legoPatentView.AddProperty(nameof(LegoPatent.Date)); + legoPatentView.AddProperty(nameof(LegoPatent.Name)); + legoPatentView.AddProperty(nameof(LegoPatent.Description)); + var legoPatentJson = legoPatent.ToJson(legoPatentView, args.Token.Model); + DataObjectDictionary det5Json = DataObjectDictionary.Parse(legoPatentJson, legoPatentView, args.Token.Model); + det5Json.Add($"{nameof(LegoPatent.BaseLegoBlock)}@odata.bind", $"{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}({((KeyGuid)legoBlock.__PrimaryKey).Guid:D})"); + legoPatentJson = det5Json.Serialize(); + + const string baseUrl = "http://localhost/odata"; + + string[] changesets = new[] + { + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockCustomPanel)).Name}", + legoBlockCustomPanelJson, + legoBlockCustomPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockBottomPanel)).Name}", + legoBlockBottomPanelJson, + legoBlockBottomPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanelHole)).Name}", + legoBlockTopPanelHoleFirstJson, + legoBlockTopPanelHoleFirst), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockTopPanel)).Name}", + legoBlockTopPanelJson, + legoBlockTopPanel), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlockColor)).Name}", + legoBlockColorJson, + legoBlockColor), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoPatent)).Name}", + legoPatentJson, + legoPatent), + CreateChangeset( + $"{baseUrl}/{args.Token.Model.GetEdmEntitySet(typeof(LegoBlock)).Name}", + legoBlockJson, + legoBlock), + }; + HttpRequestMessage batchRequest = CreateBatchRequest(baseUrl, changesets); + + // Act. + using (HttpResponseMessage response = args.HttpClient.SendAsync(batchRequest).Result) + { + // Assert. + CheckODataBatchResponseStatusCode(response, new HttpStatusCode[] { HttpStatusCode.OK, HttpStatusCode.OK, HttpStatusCode.OK, HttpStatusCode.OK, HttpStatusCode.OK, HttpStatusCode.OK, HttpStatusCode.OK }); + + legoBlockView.AddDetailInView(nameof(LegoBlock.Patents), legoPatentView, true); + legoBlockView.AddDetailInView(nameof(LegoBlock.TopPanels), legoBlockTopPanelView, true); + legoBlockView.AddDetailInView(nameof(LegoBlock.BottomPanels), legoBlockBottomPanelView, true); + legoBlockView.AddDetailInView(nameof(LegoBlock.CustomPanels), legoBlockCustomPanelView, true); + legoBlockTopPanelView.AddDetailInView(nameof(LegoBlockTopPanel.Holes), legoBlockTopPanelHoleView, true); + + legoBlock.TopPanels.Clear(); + legoBlock.CustomPanels.Clear(); + + args.DataService.LoadObject(legoBlockView, legoBlock, true, true); + + Assert.Equal(legoPatent.Authors, legoBlock.Patents[0].Authors); + Assert.Equal(legoPatent.Name, legoBlock.Patents[0].Name); + Assert.Equal(legoPatent.Description, legoBlock.Patents[0].Description); + + Assert.Equal(legoBlockBottomPanel.HeightCount, legoBlock.BottomPanels[0].HeightCount); + Assert.Equal(legoBlockBottomPanel.WidthCount, legoBlock.BottomPanels[0].WidthCount); + + Assert.Equal(legoBlockTopPanel.HeightCount, legoBlock.TopPanels[0].HeightCount); + Assert.Equal(legoBlockTopPanel.WidthCount, legoBlock.TopPanels[0].WidthCount); + + Assert.Equal(1, legoBlock.TopPanels[0].Holes.Count); + + Assert.Equal(legoBlockTopPanelHoleFirst.Position, legoBlock.TopPanels[0].Holes[0].Position); + + Assert.Equal(legoBlockCustomPanel.Position, legoBlock.CustomPanels[0].Position); + } + }); + } } }