Skip to content

Commit e7bb167

Browse files
committed
Add DicomAssociationInfoRepository Integration test for Mongo
Signed-off-by: Victor Chang <[email protected]>
1 parent 1069cc8 commit e7bb167

File tree

6 files changed

+486
-9
lines changed

6 files changed

+486
-9
lines changed

src/Database/EntityFramework/Migrations/20221123174502_R3_0.3.5.Designer.cs

Lines changed: 279 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using Microsoft.EntityFrameworkCore.Migrations;
3+
4+
#nullable disable
5+
6+
namespace Monai.Deploy.InformaticsGateway.Database.Migrations
7+
{
8+
public partial class R3_035 : Migration
9+
{
10+
protected override void Up(MigrationBuilder migrationBuilder)
11+
{
12+
migrationBuilder.CreateTable(
13+
name: "DicomAssociationHistories",
14+
columns: table => new
15+
{
16+
Id = table.Column<Guid>(type: "TEXT", nullable: false),
17+
DateTimeDisconnected = table.Column<DateTime>(type: "TEXT", nullable: false),
18+
CorrelationId = table.Column<string>(type: "TEXT", nullable: false),
19+
FileCount = table.Column<int>(type: "INTEGER", nullable: false),
20+
CallingAeTitle = table.Column<string>(type: "TEXT", nullable: true),
21+
CalledAeTitle = table.Column<string>(type: "TEXT", nullable: false),
22+
RemoteHost = table.Column<string>(type: "TEXT", nullable: false),
23+
RemotePort = table.Column<int>(type: "INTEGER", nullable: false),
24+
Errors = table.Column<string>(type: "TEXT", nullable: true),
25+
Duration = table.Column<TimeSpan>(type: "TEXT", nullable: false),
26+
DateTimeCreated = table.Column<DateTime>(type: "TEXT", nullable: false)
27+
},
28+
constraints: table =>
29+
{
30+
table.PrimaryKey("PK_DicomAssociationHistories", x => x.Id);
31+
});
32+
}
33+
34+
protected override void Down(MigrationBuilder migrationBuilder)
35+
{
36+
migrationBuilder.DropTable(
37+
name: "DicomAssociationHistories");
38+
}
39+
}
40+
}

src/Database/EntityFramework/Migrations/InformaticsGatewayContextModelSnapshot.cs

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ partial class InformaticsGatewayContextModelSnapshot : ModelSnapshot
1515
protected override void BuildModel(ModelBuilder modelBuilder)
1616
{
1717
#pragma warning disable 612, 618
18-
modelBuilder.HasAnnotation("ProductVersion", "6.0.10");
18+
modelBuilder.HasAnnotation("ProductVersion", "6.0.11");
1919

2020
modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.DestinationApplicationEntity", b =>
2121
{
@@ -47,6 +47,50 @@ protected override void BuildModel(ModelBuilder modelBuilder)
4747
b.ToTable("DestinationApplicationEntities");
4848
});
4949

50+
modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.DicomAssociationInfo", b =>
51+
{
52+
b.Property<Guid>("Id")
53+
.ValueGeneratedOnAdd()
54+
.HasColumnType("TEXT");
55+
56+
b.Property<string>("CalledAeTitle")
57+
.IsRequired()
58+
.HasColumnType("TEXT");
59+
60+
b.Property<string>("CallingAeTitle")
61+
.HasColumnType("TEXT");
62+
63+
b.Property<string>("CorrelationId")
64+
.IsRequired()
65+
.HasColumnType("TEXT");
66+
67+
b.Property<DateTime>("DateTimeCreated")
68+
.HasColumnType("TEXT");
69+
70+
b.Property<DateTime>("DateTimeDisconnected")
71+
.HasColumnType("TEXT");
72+
73+
b.Property<TimeSpan>("Duration")
74+
.HasColumnType("TEXT");
75+
76+
b.Property<string>("Errors")
77+
.HasColumnType("TEXT");
78+
79+
b.Property<int>("FileCount")
80+
.HasColumnType("INTEGER");
81+
82+
b.Property<string>("RemoteHost")
83+
.IsRequired()
84+
.HasColumnType("TEXT");
85+
86+
b.Property<int>("RemotePort")
87+
.HasColumnType("INTEGER");
88+
89+
b.HasKey("Id");
90+
91+
b.ToTable("DicomAssociationHistories");
92+
});
93+
5094
modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.MonaiApplicationEntity", b =>
5195
{
5296
b.Property<string>("Name")

src/Database/EntityFramework/Test/SqliteDatabaseFixture.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
using Microsoft.EntityFrameworkCore;
1818
using Monai.Deploy.InformaticsGateway.Api;
19-
using Monai.Deploy.InformaticsGateway.Api.Storage;
2019

2120
namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Test
2221
{
@@ -128,6 +127,5 @@ public void Dispose()
128127
{
129128
DatabaseContext.Dispose();
130129
}
131-
132130
}
133131
}

0 commit comments

Comments
 (0)