From 18e836e2d6e1c46d80a1744d6901ee1440919ab0 Mon Sep 17 00:00:00 2001 From: nnikolopoulos Date: Wed, 19 Apr 2023 17:53:19 +0200 Subject: [PATCH 1/3] Introduce IOActivity and IOContent --- ifrs17/Utils/ActivityLog.ipynb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index c522bc2d..f3dd3f58 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -79,8 +79,8 @@ { "cell_type": "markdown", "source": [ - "## Import Export Activity ", - "\nEvery activity to and from (import or export) the DataSource is tracked by recording an ImportExportActivity. Among other information this record tracks the user who performs the action, the timestamp, the activity log, and the unique identifier which can be used to retrieve the data subject of the activity. " + "## Input Output Activity ", + "\nEvery activity to and from (import or export) the DataSource is tracked by recording an IOActivity. Among other information this record tracks the user who performs the action, the timestamp, the activity log, and the unique identifier which can be used to retrieve the data subject of the activity. " ], "metadata": {}, "execution_count": 0, @@ -89,7 +89,7 @@ { "cell_type": "code", "source": [ - "public record ImportExportActivity : KeyedRecord", + "public record IOActivity : KeyedRecord", "\n{", "\n public string Username {get; init;}", "\n", @@ -114,7 +114,7 @@ "\n", "\n public Guid? SourceId {get; init;} ", "\n ", - "\n public ImportExportActivity(ActivityLog log, ISessionVariable session)", + "\n public IOActivity(ActivityLog log, ISessionVariable session)", "\n {", "\n Id = Guid.NewGuid();", "\n Username = session.User.Name;", @@ -126,7 +126,7 @@ "\n InfoMessages = log.Infos.Select(x => x.ProcessNotification()).Distinct().ToArray();", "\n }", "\n", - "\n public ImportExportActivity(Guid id)", + "\n public IOActivity(Guid id)", "\n {", "\n Id = id;", "\n }", @@ -140,7 +140,7 @@ { "cell_type": "markdown", "source": [ - "## Keyed Import Export", + "## Input Output Content", "\nContains the information of the file that has been the object of the activity. Among other information, it contains the content of the file in a serialized format. " ], "metadata": {}, @@ -150,7 +150,7 @@ { "cell_type": "code", "source": [ - "public abstract record KeyedImportExport : KeyedRecord", + "public record IOContent : KeyedRecord", "\n{", "\n public DateTime CreationTime {get; init;}", "\n public byte[] SerializedContent {get; init;}", @@ -159,7 +159,7 @@ "\n protected IDataSetImportVariable DataSetReader {get; set;}", "\n protected ISessionVariable Session {get; set;}", "\n", - "\n public KeyedImportExport() ", + "\n public IOContent() ", "\n { ", "\n Id = Guid.NewGuid();", "\n }", @@ -172,7 +172,7 @@ { "cell_type": "code", "source": [ - "public record ExportFile : KeyedImportExport", + "public record ExportFile : IOContent", "\n{", "\n protected DocumentBuilder Builder {get; set;}", "\n", @@ -222,7 +222,7 @@ { "cell_type": "code", "source": [ - "public abstract record KeyedImport : KeyedImportExport", + "public abstract record KeyedImport : IOContent", "\n{", "\n protected ImportOptions Options {get; set;}", "\n", @@ -494,16 +494,16 @@ "\n _ => null,", "\n };", "\n if (activity is null) throw new Exception(\"Import Options object is not an instance of an appropriate class.\");", - "\n await DataSource.UpdateAsync(activity.RepeatOnce());", + "\n await DataSource.UpdateAsync(activity.RepeatOnce());", "\n await DataSource.CommitAsync();", "\n return log;", "\n }", "\n", - "\n private async Task ReportInputAndUpdateActivityAsync(ActivityLog log, TOptions options, string categoryMessage)", + "\n private async Task ReportInputAndUpdateActivityAsync(ActivityLog log, TOptions options, string categoryMessage)", "\n where TOptions: ImportOptions", "\n where TImport: KeyedImport, new()", "\n {", - "\n var activity = new ImportExportActivity(log, Session);", + "\n var activity = new IOActivity(log, Session);", "\n try", "\n {", "\n var import = new TImport();", @@ -544,10 +544,10 @@ "\n {", "\n var exportResult = await Builder.ExecuteAsync();", "\n var exportFile = await (new ExportFile(Builder, ImportVariable, Session)).InitializeExportDataAsync();", - "\n var activity = new ImportExportActivity(exportResult.ActivityLog, Session) with {Category = \"Export to File\", ", + "\n var activity = new IOActivity(exportResult.ActivityLog, Session) with {Category = \"Export to File\", ", "\n SourceId = exportFile.Id};", "\n await DataSource.UpdateAsync(exportFile.RepeatOnce());", - "\n await DataSource.UpdateAsync(activity.RepeatOnce());", + "\n await DataSource.UpdateAsync(activity.RepeatOnce());", "\n await DataSource.CommitAsync();", "\n return exportResult;", "\n }", From cef204a930ef0315420f43a8dea28470bc6d2b16 Mon Sep 17 00:00:00 2001 From: nnikolopoulos Date: Mon, 24 Apr 2023 10:52:23 +0200 Subject: [PATCH 2/3] Implement Davide's feedback in ActivityLog --- ifrs17/Utils/ActivityLog.ipynb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ifrs17/Utils/ActivityLog.ipynb b/ifrs17/Utils/ActivityLog.ipynb index f3dd3f58..3156e7ee 100644 --- a/ifrs17/Utils/ActivityLog.ipynb +++ b/ifrs17/Utils/ActivityLog.ipynb @@ -158,6 +158,8 @@ "\n public string Format {get; init;}", "\n protected IDataSetImportVariable DataSetReader {get; set;}", "\n protected ISessionVariable Session {get; set;}", + "\n public string Name {get; init;}", + "\n public string ContentType {get; init;}", "\n", "\n public IOContent() ", "\n { ", @@ -176,10 +178,6 @@ "\n{", "\n protected DocumentBuilder Builder {get; set;}", "\n", - "\n public string Name {get; init;}", - "\n", - "\n public string ContentType {get; init;}", - "\n", "\n public ExportFile(DocumentBuilder builder, IDataSetImportVariable importVariable, ISessionVariable session)", "\n {", "\n Builder = builder;", @@ -290,11 +288,7 @@ "source": [ "public record ImportFile : KeyedImport", "\n{", - "\n public string Name {get; init;}", - "\n", "\n public string Directory {get; init;}", - "\n ", - "\n public string ContentType {get; init;}", "\n", "\n [Conversion(typeof(JsonConverter))]", "\n public string[] Partition {get; init;}", From 8ef943de6906325d4bee01ecc83d3c9b537271eb Mon Sep 17 00:00:00 2001 From: nnikolopoulos Date: Mon, 24 Apr 2023 10:52:46 +0200 Subject: [PATCH 3/3] Update migration notebooks --- .../MigrationAndScaffolding/Initial.ipynb | 113 ++----- .../MigrationAndScaffolding/Snapshot.ipynb | 313 ++++++++---------- 2 files changed, 172 insertions(+), 254 deletions(-) diff --git a/ifrs17-template/Database/MigrationAndScaffolding/Initial.ipynb b/ifrs17-template/Database/MigrationAndScaffolding/Initial.ipynb index 312469a8..7ecada76 100644 --- a/ifrs17-template/Database/MigrationAndScaffolding/Initial.ipynb +++ b/ifrs17-template/Database/MigrationAndScaffolding/Initial.ipynb @@ -37,7 +37,7 @@ { "cell_type": "code", "source": [ - "[Migration(\"20230412161547_InitialTypes\")]", + "[Migration(\"20230424082837_InitialTypes\")]", "\npublic class InitialTypes : Migration", "\n{", "\n protected override void Up(MigrationBuilder migrationBuilder)", @@ -233,28 +233,23 @@ "\n });", "\n", "\n migrationBuilder.CreateTable(", - "\n name: \"ExportFile\",", - "\n columns: table => new", - "\n {", - "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", - "\n Name = table.Column(type: \"nvarchar(max)\", nullable: true),", - "\n ContentType = table.Column(type: \"nvarchar(max)\", nullable: true),", - "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", - "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", - "\n Length = table.Column(type: \"bigint\", nullable: true),", - "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true)", - "\n },", - "\n constraints: table =>", - "\n {", - "\n table.PrimaryKey(\"PK_ExportFile\", x => x.Id);", - "\n });", - "\n", - "\n migrationBuilder.CreateTable(", "\n name: \"IfrsVariable\",", "\n columns: table => new", "\n {", "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", "\n Value = table.Column(type: \"float\", nullable: false),", + "\n Value1 = table.Column(type: \"float\", nullable: false),", + "\n Value2 = table.Column(type: \"float\", nullable: false),", + "\n Value3 = table.Column(type: \"float\", nullable: false),", + "\n Value4 = table.Column(type: \"float\", nullable: false),", + "\n Value5 = table.Column(type: \"float\", nullable: false),", + "\n Value6 = table.Column(type: \"float\", nullable: false),", + "\n Value7 = table.Column(type: \"float\", nullable: false),", + "\n Value8 = table.Column(type: \"float\", nullable: false),", + "\n Value9 = table.Column(type: \"float\", nullable: false),", + "\n Value10 = table.Column(type: \"float\", nullable: false),", + "\n Value11 = table.Column(type: \"float\", nullable: false),", + "\n Value12 = table.Column(type: \"float\", nullable: false),", "\n EstimateType = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n EconomicBasis = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n DataNode = table.Column(type: \"nvarchar(max)\", nullable: true),", @@ -270,22 +265,7 @@ "\n });", "\n", "\n migrationBuilder.CreateTable(", - "\n name: \"ImportDataSet\",", - "\n columns: table => new", - "\n {", - "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", - "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", - "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", - "\n Length = table.Column(type: \"bigint\", nullable: true),", - "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true)", - "\n },", - "\n constraints: table =>", - "\n {", - "\n table.PrimaryKey(\"PK_ImportDataSet\", x => x.Id);", - "\n });", - "\n", - "\n migrationBuilder.CreateTable(", - "\n name: \"ImportExportActivity\",", + "\n name: \"IOActivity\",", "\n columns: table => new", "\n {", "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", @@ -302,58 +282,29 @@ "\n },", "\n constraints: table =>", "\n {", - "\n table.PrimaryKey(\"PK_ImportExportActivity\", x => x.Id);", + "\n table.PrimaryKey(\"PK_IOActivity\", x => x.Id);", "\n });", "\n", "\n migrationBuilder.CreateTable(", - "\n name: \"ImportFile\",", + "\n name: \"IOContent\",", "\n columns: table => new", "\n {", "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", + "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", + "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", + "\n Length = table.Column(type: \"bigint\", nullable: true),", + "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n Name = table.Column(type: \"nvarchar(max)\", nullable: true),", - "\n Directory = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n ContentType = table.Column(type: \"nvarchar(max)\", nullable: true),", + "\n Discriminator = table.Column(type: \"nvarchar(max)\", nullable: false),", + "\n Directory = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n Partition = table.Column(type: \"nvarchar(max)\", nullable: true),", "\n Source = table.Column(type: \"nvarchar(max)\", nullable: true),", - "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", - "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", - "\n Length = table.Column(type: \"bigint\", nullable: true),", - "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true)", + "\n Content = table.Column(type: \"nvarchar(max)\", nullable: true)", "\n },", "\n constraints: table =>", "\n {", - "\n table.PrimaryKey(\"PK_ImportFile\", x => x.Id);", - "\n });", - "\n", - "\n migrationBuilder.CreateTable(", - "\n name: \"ImportStream\",", - "\n columns: table => new", - "\n {", - "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", - "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", - "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", - "\n Length = table.Column(type: \"bigint\", nullable: true),", - "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true)", - "\n },", - "\n constraints: table =>", - "\n {", - "\n table.PrimaryKey(\"PK_ImportStream\", x => x.Id);", - "\n });", - "\n", - "\n migrationBuilder.CreateTable(", - "\n name: \"ImportString\",", - "\n columns: table => new", - "\n {", - "\n Id = table.Column(type: \"uniqueidentifier\", nullable: false),", - "\n Content = table.Column(type: \"nvarchar(max)\", nullable: true),", - "\n CreationTime = table.Column(type: \"datetime2\", nullable: false),", - "\n SerializedContent = table.Column(type: \"varbinary(max)\", nullable: true),", - "\n Length = table.Column(type: \"bigint\", nullable: true),", - "\n Format = table.Column(type: \"nvarchar(max)\", nullable: true)", - "\n },", - "\n constraints: table =>", - "\n {", - "\n table.PrimaryKey(\"PK_ImportString\", x => x.Id);", + "\n table.PrimaryKey(\"PK_IOContent\", x => x.Id);", "\n });", "\n", "\n migrationBuilder.CreateTable(", @@ -646,25 +597,13 @@ "\n name: \"ExchangeRate\");", "\n", "\n migrationBuilder.DropTable(", - "\n name: \"ExportFile\");", - "\n", - "\n migrationBuilder.DropTable(", "\n name: \"IfrsVariable\");", "\n", "\n migrationBuilder.DropTable(", - "\n name: \"ImportDataSet\");", - "\n", - "\n migrationBuilder.DropTable(", - "\n name: \"ImportExportActivity\");", - "\n", - "\n migrationBuilder.DropTable(", - "\n name: \"ImportFile\");", - "\n", - "\n migrationBuilder.DropTable(", - "\n name: \"ImportStream\");", + "\n name: \"IOActivity\");", "\n", "\n migrationBuilder.DropTable(", - "\n name: \"ImportString\");", + "\n name: \"IOContent\");", "\n", "\n migrationBuilder.DropTable(", "\n name: \"LiabilityType\");", diff --git a/ifrs17-template/Database/MigrationAndScaffolding/Snapshot.ipynb b/ifrs17-template/Database/MigrationAndScaffolding/Snapshot.ipynb index 08182bd2..cefc0d9b 100644 --- a/ifrs17-template/Database/MigrationAndScaffolding/Snapshot.ipynb +++ b/ifrs17-template/Database/MigrationAndScaffolding/Snapshot.ipynb @@ -51,7 +51,7 @@ "\n", "\n SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);", "\n", - "\n modelBuilder.Entity(\"Submission_102+RawVariable\", b =>", + "\n modelBuilder.Entity(\"Submission_103+RawVariable\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -86,7 +86,7 @@ "\n b.ToTable(\"RawVariable\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_103+IfrsVariable\", b =>", + "\n modelBuilder.Entity(\"Submission_104+IfrsVariable\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -119,12 +119,48 @@ "\n b.Property(\"Value\")", "\n .HasColumnType(\"float\");", "\n", + "\n b.Property(\"Value1\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value10\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value11\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value12\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value2\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value3\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value4\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value5\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value6\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value7\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value8\")", + "\n .HasColumnType(\"float\");", + "\n", + "\n b.Property(\"Value9\")", + "\n .HasColumnType(\"float\");", + "\n", "\n b.HasKey(\"Id\");", "\n", "\n b.ToTable(\"IfrsVariable\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_154+ImportExportActivity\", b =>", + "\n modelBuilder.Entity(\"Submission_155+IOActivity\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -162,10 +198,10 @@ "\n", "\n b.HasKey(\"Id\");", "\n", - "\n b.ToTable(\"ImportExportActivity\");", + "\n b.ToTable(\"IOActivity\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_156+ExportFile\", b =>", + "\n modelBuilder.Entity(\"Submission_156+IOContent\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -177,36 +213,8 @@ "\n b.Property(\"CreationTime\")", "\n .HasColumnType(\"datetime2\");", "\n", - "\n b.Property(\"Format\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"Length\")", - "\n .HasColumnType(\"bigint\");", - "\n", - "\n b.Property(\"Name\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"SerializedContent\")", - "\n .HasColumnType(\"varbinary(max)\");", - "\n", - "\n b.HasKey(\"Id\");", - "\n", - "\n b.ToTable(\"ExportFile\");", - "\n });", - "\n", - "\n modelBuilder.Entity(\"Submission_158+ImportFile\", b =>", - "\n {", - "\n b.Property(\"Id\")", - "\n .ValueGeneratedOnAdd()", - "\n .HasColumnType(\"uniqueidentifier\");", - "\n", - "\n b.Property(\"ContentType\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"CreationTime\")", - "\n .HasColumnType(\"datetime2\");", - "\n", - "\n b.Property(\"Directory\")", + "\n b.Property(\"Discriminator\")", + "\n .IsRequired()", "\n .HasColumnType(\"nvarchar(max)\");", "\n", "\n b.Property(\"Format\")", @@ -218,93 +226,17 @@ "\n b.Property(\"Name\")", "\n .HasColumnType(\"nvarchar(max)\");", "\n", - "\n b.Property(\"Partition\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", "\n b.Property(\"SerializedContent\")", "\n .HasColumnType(\"varbinary(max)\");", "\n", - "\n b.Property(\"Source\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", "\n b.HasKey(\"Id\");", "\n", - "\n b.ToTable(\"ImportFile\");", - "\n });", - "\n", - "\n modelBuilder.Entity(\"Submission_159+ImportString\", b =>", - "\n {", - "\n b.Property(\"Id\")", - "\n .ValueGeneratedOnAdd()", - "\n .HasColumnType(\"uniqueidentifier\");", + "\n b.ToTable(\"IOContent\");", "\n", - "\n b.Property(\"Content\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"CreationTime\")", - "\n .HasColumnType(\"datetime2\");", - "\n", - "\n b.Property(\"Format\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"Length\")", - "\n .HasColumnType(\"bigint\");", - "\n", - "\n b.Property(\"SerializedContent\")", - "\n .HasColumnType(\"varbinary(max)\");", - "\n", - "\n b.HasKey(\"Id\");", - "\n", - "\n b.ToTable(\"ImportString\");", - "\n });", - "\n", - "\n modelBuilder.Entity(\"Submission_160+ImportDataSet\", b =>", - "\n {", - "\n b.Property(\"Id\")", - "\n .ValueGeneratedOnAdd()", - "\n .HasColumnType(\"uniqueidentifier\");", - "\n", - "\n b.Property(\"CreationTime\")", - "\n .HasColumnType(\"datetime2\");", - "\n", - "\n b.Property(\"Format\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"Length\")", - "\n .HasColumnType(\"bigint\");", - "\n", - "\n b.Property(\"SerializedContent\")", - "\n .HasColumnType(\"varbinary(max)\");", - "\n", - "\n b.HasKey(\"Id\");", - "\n", - "\n b.ToTable(\"ImportDataSet\");", - "\n });", - "\n", - "\n modelBuilder.Entity(\"Submission_161+ImportStream\", b =>", - "\n {", - "\n b.Property(\"Id\")", - "\n .ValueGeneratedOnAdd()", - "\n .HasColumnType(\"uniqueidentifier\");", - "\n", - "\n b.Property(\"CreationTime\")", - "\n .HasColumnType(\"datetime2\");", - "\n", - "\n b.Property(\"Format\")", - "\n .HasColumnType(\"nvarchar(max)\");", - "\n", - "\n b.Property(\"Length\")", - "\n .HasColumnType(\"bigint\");", - "\n", - "\n b.Property(\"SerializedContent\")", - "\n .HasColumnType(\"varbinary(max)\");", - "\n", - "\n b.HasKey(\"Id\");", - "\n", - "\n b.ToTable(\"ImportStream\");", + "\n b.HasDiscriminator(\"Discriminator\").HasValue(\"IOContent\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_174+YieldCurveReport\", b =>", + "\n modelBuilder.Entity(\"Submission_175+YieldCurveReport\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -333,7 +265,7 @@ "\n b.ToTable(\"YieldCurveReport\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_61+AmountType\", b =>", + "\n modelBuilder.Entity(\"Submission_62+AmountType\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -365,7 +297,7 @@ "\n b.HasDiscriminator(\"Discriminator\").HasValue(\"AmountType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_63+RiskDriver\", b =>", + "\n modelBuilder.Entity(\"Submission_64+RiskDriver\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -385,7 +317,7 @@ "\n b.ToTable(\"RiskDriver\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_64+EstimateType\", b =>", + "\n modelBuilder.Entity(\"Submission_65+EstimateType\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -414,7 +346,7 @@ "\n b.ToTable(\"EstimateType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_65+Novelty\", b =>", + "\n modelBuilder.Entity(\"Submission_66+Novelty\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -431,7 +363,7 @@ "\n b.ToTable(\"Novelty\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_66+VariableType\", b =>", + "\n modelBuilder.Entity(\"Submission_67+VariableType\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -457,7 +389,7 @@ "\n b.HasDiscriminator(\"Discriminator\").HasValue(\"VariableType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_72+Scenario\", b =>", + "\n modelBuilder.Entity(\"Submission_73+Scenario\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -471,7 +403,7 @@ "\n b.ToTable(\"Scenario\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_73+LineOfBusiness\", b =>", + "\n modelBuilder.Entity(\"Submission_74+LineOfBusiness\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -491,7 +423,7 @@ "\n b.ToTable(\"LineOfBusiness\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_74+Currency\", b =>", + "\n modelBuilder.Entity(\"Submission_75+Currency\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -505,7 +437,7 @@ "\n b.ToTable(\"Currency\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_75+EconomicBasis\", b =>", + "\n modelBuilder.Entity(\"Submission_76+EconomicBasis\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -519,7 +451,7 @@ "\n b.ToTable(\"EconomicBasis\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_76+ValuationApproach\", b =>", + "\n modelBuilder.Entity(\"Submission_77+ValuationApproach\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -533,7 +465,7 @@ "\n b.ToTable(\"ValuationApproach\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_77+LiabilityType\", b =>", + "\n modelBuilder.Entity(\"Submission_78+LiabilityType\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -550,7 +482,7 @@ "\n b.ToTable(\"LiabilityType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_78+OciType\", b =>", + "\n modelBuilder.Entity(\"Submission_79+OciType\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -564,7 +496,7 @@ "\n b.ToTable(\"OciType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_79+Profitability\", b =>", + "\n modelBuilder.Entity(\"Submission_80+Profitability\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -578,7 +510,7 @@ "\n b.ToTable(\"Profitability\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_80+Partner\", b =>", + "\n modelBuilder.Entity(\"Submission_81+Partner\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -592,7 +524,7 @@ "\n b.ToTable(\"Partner\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_81+CreditRiskRating\", b =>", + "\n modelBuilder.Entity(\"Submission_82+CreditRiskRating\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -606,7 +538,7 @@ "\n b.ToTable(\"CreditRiskRating\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_82+ReportingNode\", b =>", + "\n modelBuilder.Entity(\"Submission_83+ReportingNode\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -627,7 +559,7 @@ "\n b.ToTable(\"ReportingNode\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_83+ProjectionConfiguration\", b =>", + "\n modelBuilder.Entity(\"Submission_84+ProjectionConfiguration\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -647,7 +579,7 @@ "\n b.ToTable(\"ProjectionConfiguration\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_84+AocConfiguration\", b =>", + "\n modelBuilder.Entity(\"Submission_85+AocConfiguration\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -694,7 +626,7 @@ "\n b.ToTable(\"AocConfiguration\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_85+ExchangeRate\", b =>", + "\n modelBuilder.Entity(\"Submission_86+ExchangeRate\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -724,7 +656,7 @@ "\n b.ToTable(\"ExchangeRate\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_86+CreditDefaultRate\", b =>", + "\n modelBuilder.Entity(\"Submission_87+CreditDefaultRate\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -751,7 +683,7 @@ "\n b.ToTable(\"CreditDefaultRate\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_87+YieldCurve\", b =>", + "\n modelBuilder.Entity(\"Submission_88+YieldCurve\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -781,7 +713,7 @@ "\n b.ToTable(\"YieldCurve\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_88+PartnerRating\", b =>", + "\n modelBuilder.Entity(\"Submission_89+PartnerRating\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -809,7 +741,7 @@ "\n b.ToTable(\"PartnerRating\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_90+PartitionByReportingNode\", b =>", + "\n modelBuilder.Entity(\"Submission_91+PartitionByReportingNode\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -824,7 +756,7 @@ "\n b.ToTable(\"PartitionByReportingNode\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_91+PartitionByReportingNodeAndPeriod\", b =>", + "\n modelBuilder.Entity(\"Submission_92+PartitionByReportingNodeAndPeriod\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -848,7 +780,7 @@ "\n b.ToTable(\"PartitionByReportingNodeAndPeriod\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_92+DataNode\", b =>", + "\n modelBuilder.Entity(\"Submission_93+DataNode\", b =>", "\n {", "\n b.Property(\"SystemName\")", "\n .HasMaxLength(16)", @@ -887,7 +819,7 @@ "\n b.HasDiscriminator(\"Discriminator\").HasValue(\"DataNode\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_96+DataNodeState\", b =>", + "\n modelBuilder.Entity(\"Submission_97+DataNodeState\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -917,7 +849,7 @@ "\n b.ToTable(\"DataNodeState\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_97+DataNodeParameter\", b =>", + "\n modelBuilder.Entity(\"Submission_98+DataNodeParameter\", b =>", "\n {", "\n b.Property(\"Id\")", "\n .ValueGeneratedOnAdd()", @@ -950,51 +882,98 @@ "\n b.HasDiscriminator(\"Discriminator\").HasValue(\"DataNodeParameter\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_62+DeferrableAmountType\", b =>", + "\n modelBuilder.Entity(\"Submission_157+ExportFile\", b =>", + "\n {", + "\n b.HasBaseType(\"Submission_156+IOContent\");", + "\n", + "\n b.HasDiscriminator().HasValue(\"ExportFile\");", + "\n });", + "\n", + "\n modelBuilder.Entity(\"Submission_159+ImportFile\", b =>", + "\n {", + "\n b.HasBaseType(\"Submission_156+IOContent\");", + "\n", + "\n b.Property(\"Directory\")", + "\n .HasColumnType(\"nvarchar(max)\");", + "\n", + "\n b.Property(\"Partition\")", + "\n .HasColumnType(\"nvarchar(max)\");", + "\n", + "\n b.Property(\"Source\")", + "\n .HasColumnType(\"nvarchar(max)\");", + "\n", + "\n b.HasDiscriminator().HasValue(\"ImportFile\");", + "\n });", + "\n", + "\n modelBuilder.Entity(\"Submission_160+ImportString\", b =>", + "\n {", + "\n b.HasBaseType(\"Submission_156+IOContent\");", + "\n", + "\n b.Property(\"Content\")", + "\n .HasColumnType(\"nvarchar(max)\");", + "\n", + "\n b.HasDiscriminator().HasValue(\"ImportString\");", + "\n });", + "\n", + "\n modelBuilder.Entity(\"Submission_161+ImportDataSet\", b =>", + "\n {", + "\n b.HasBaseType(\"Submission_156+IOContent\");", + "\n", + "\n b.HasDiscriminator().HasValue(\"ImportDataSet\");", + "\n });", + "\n", + "\n modelBuilder.Entity(\"Submission_162+ImportStream\", b =>", + "\n {", + "\n b.HasBaseType(\"Submission_156+IOContent\");", + "\n", + "\n b.HasDiscriminator().HasValue(\"ImportStream\");", + "\n });", + "\n", + "\n modelBuilder.Entity(\"Submission_63+DeferrableAmountType\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_61+AmountType\");", + "\n b.HasBaseType(\"Submission_62+AmountType\");", "\n", "\n b.HasDiscriminator().HasValue(\"DeferrableAmountType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_67+AocType\", b =>", + "\n modelBuilder.Entity(\"Submission_68+AocType\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_66+VariableType\");", + "\n b.HasBaseType(\"Submission_67+VariableType\");", "\n", "\n b.HasDiscriminator().HasValue(\"AocType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_69+PnlVariableType\", b =>", + "\n modelBuilder.Entity(\"Submission_70+PnlVariableType\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_66+VariableType\");", + "\n b.HasBaseType(\"Submission_67+VariableType\");", "\n", "\n b.HasDiscriminator().HasValue(\"PnlVariableType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_70+BsVariableType\", b =>", + "\n modelBuilder.Entity(\"Submission_71+BsVariableType\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_66+VariableType\");", + "\n b.HasBaseType(\"Submission_67+VariableType\");", "\n", "\n b.HasDiscriminator().HasValue(\"BsVariableType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_71+AccountingVariableType\", b =>", + "\n modelBuilder.Entity(\"Submission_72+AccountingVariableType\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_66+VariableType\");", + "\n b.HasBaseType(\"Submission_67+VariableType\");", "\n", "\n b.HasDiscriminator().HasValue(\"AccountingVariableType\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_93+Portfolio\", b =>", + "\n modelBuilder.Entity(\"Submission_94+Portfolio\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_92+DataNode\");", + "\n b.HasBaseType(\"Submission_93+DataNode\");", "\n", "\n b.HasDiscriminator().HasValue(\"Portfolio\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_94+GroupOfContract\", b =>", + "\n modelBuilder.Entity(\"Submission_95+GroupOfContract\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_92+DataNode\");", + "\n b.HasBaseType(\"Submission_93+DataNode\");", "\n", "\n b.Property(\"AnnualCohort\")", "\n .HasColumnType(\"int\");", @@ -1018,9 +997,9 @@ "\n b.HasDiscriminator().HasValue(\"GroupOfContract\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_98+InterDataNodeParameter\", b =>", + "\n modelBuilder.Entity(\"Submission_99+InterDataNodeParameter\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_97+DataNodeParameter\");", + "\n b.HasBaseType(\"Submission_98+DataNodeParameter\");", "\n", "\n b.Property(\"LinkedDataNode\")", "\n .IsRequired()", @@ -1032,9 +1011,9 @@ "\n b.HasDiscriminator().HasValue(\"InterDataNodeParameter\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_98+SingleDataNodeParameter\", b =>", + "\n modelBuilder.Entity(\"Submission_99+SingleDataNodeParameter\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_97+DataNodeParameter\");", + "\n b.HasBaseType(\"Submission_98+DataNodeParameter\");", "\n", "\n b.Property(\"CashFlowPeriodicity\")", "\n .HasColumnType(\"int\");", @@ -1048,30 +1027,30 @@ "\n b.HasDiscriminator().HasValue(\"SingleDataNodeParameter\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_93+InsurancePortfolio\", b =>", + "\n modelBuilder.Entity(\"Submission_94+InsurancePortfolio\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_93+Portfolio\");", + "\n b.HasBaseType(\"Submission_94+Portfolio\");", "\n", "\n b.HasDiscriminator().HasValue(\"InsurancePortfolio\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_93+ReinsurancePortfolio\", b =>", + "\n modelBuilder.Entity(\"Submission_94+ReinsurancePortfolio\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_93+Portfolio\");", + "\n b.HasBaseType(\"Submission_94+Portfolio\");", "\n", "\n b.HasDiscriminator().HasValue(\"ReinsurancePortfolio\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_95+GroupOfInsuranceContract\", b =>", + "\n modelBuilder.Entity(\"Submission_96+GroupOfInsuranceContract\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_94+GroupOfContract\");", + "\n b.HasBaseType(\"Submission_95+GroupOfContract\");", "\n", "\n b.HasDiscriminator().HasValue(\"GroupOfInsuranceContract\");", "\n });", "\n", - "\n modelBuilder.Entity(\"Submission_95+GroupOfReinsuranceContract\", b =>", + "\n modelBuilder.Entity(\"Submission_96+GroupOfReinsuranceContract\", b =>", "\n {", - "\n b.HasBaseType(\"Submission_94+GroupOfContract\");", + "\n b.HasBaseType(\"Submission_95+GroupOfContract\");", "\n", "\n b.HasDiscriminator().HasValue(\"GroupOfReinsuranceContract\");", "\n });",