diff --git a/docs/schema/V1/schema.verified.graphql b/docs/schema/V1/schema.verified.graphql
index 3d97edd7d..00feb2391 100644
--- a/docs/schema/V1/schema.verified.graphql
+++ b/docs/schema/V1/schema.verified.graphql
@@ -115,7 +115,7 @@ type Element {
type ElementUrl {
id: UUID!
url: URL!
- mimeType: String
+ mediaType: String
consumerType: ElementUrlConsumer!
}
diff --git a/docs/schema/V1/swagger.verified.json b/docs/schema/V1/swagger.verified.json
index 138d56a0c..21a5ea188 100644
--- a/docs/schema/V1/swagger.verified.json
+++ b/docs/schema/V1/swagger.verified.json
@@ -266,7 +266,7 @@
{
"Id": "858177cb-8584-4d10-a086-3a5defa7a6c3",
"Url": "http://example.com/some-url",
- "MimeType": "application/json",
+ "MediaType": "application/json",
"ConsumerType": 0
}
]
@@ -2604,7 +2604,7 @@
"type": "string",
"format": "uri"
},
- "mimeType": {
+ "mediaType": {
"type": "string",
"nullable": true
},
@@ -3159,7 +3159,7 @@
"type": "string",
"format": "uri"
},
- "mimeType": {
+ "mediaType": {
"type": "string",
"nullable": true
},
@@ -3504,7 +3504,7 @@
"type": "string",
"format": "uri"
},
- "mimeType": {
+ "mediaType": {
"type": "string",
"nullable": true
},
@@ -4225,7 +4225,7 @@
"type": "string",
"format": "uri"
},
- "mimeType": {
+ "mediaType": {
"type": "string",
"nullable": true
},
@@ -4474,4 +4474,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/DialogElements/Queries/Get/GetDialogElementDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/DialogElements/Queries/Get/GetDialogElementDto.cs
index 53e8cf098..1ea3ce309 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/DialogElements/Queries/Get/GetDialogElementDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/DialogElements/Queries/Get/GetDialogElementDto.cs
@@ -21,7 +21,7 @@ public sealed class GetDialogElementUrlDto
{
public Guid Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs
index a675c26ce..73b24cf41 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/EndUser/Dialogs/Queries/Get/GetDialogDto.cs
@@ -129,7 +129,7 @@ public sealed class GetDialogDialogElementUrlDto
{
public Guid Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/DialogElements/Queries/Get/GetDialogElementDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/DialogElements/Queries/Get/GetDialogElementDto.cs
index a37c21e88..b0c476cd3 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/DialogElements/Queries/Get/GetDialogElementDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/DialogElements/Queries/Get/GetDialogElementDto.cs
@@ -22,7 +22,7 @@ public sealed class GetDialogElementUrlDto
{
public Guid Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs
index 6dbcf7605..551efb14d 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogCommandValidator.cs
@@ -169,7 +169,7 @@ public CreateDialogDialogElementUrlDtoValidator()
.NotNull()
.IsValidUri()
.MaximumLength(Constants.DefaultMaxUriLength);
- RuleFor(x => x.MimeType)
+ RuleFor(x => x.MediaType)
.MaximumLength(Constants.DefaultMaxStringLength);
RuleFor(x => x.ConsumerType)
.IsInEnum();
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogDto.cs
index e7d1cb9d9..a489c84f2 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Create/CreateDialogDto.cs
@@ -108,7 +108,7 @@ public sealed class CreateDialogDialogElementDto
public sealed class CreateDialogDialogElementUrlDto
{
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogCommandValidator.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogCommandValidator.cs
index ee7a106a9..3652760bd 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogCommandValidator.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogCommandValidator.cs
@@ -166,7 +166,7 @@ public UpdateDialogDialogElementUrlDtoValidator()
.NotNull()
.IsValidUri()
.MaximumLength(Constants.DefaultMaxUriLength);
- RuleFor(x => x.MimeType)
+ RuleFor(x => x.MediaType)
.MaximumLength(Constants.DefaultMaxStringLength);
RuleFor(x => x.ConsumerType)
.IsInEnum();
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogDto.cs
index df5d95424..a8325e548 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Commands/Update/UpdateDialogDto.cs
@@ -110,7 +110,7 @@ public sealed class UpdateDialogDialogElementUrlDto
{
public Guid? Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs
index b6fa62218..e5a20e408 100644
--- a/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs
+++ b/src/Digdir.Domain.Dialogporten.Application/Features/V1/ServiceOwner/Dialogs/Queries/Get/GetDialogDto.cs
@@ -130,7 +130,7 @@ public sealed class GetDialogDialogElementUrlDto
{
public Guid Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public DialogElementUrlConsumerType.Values ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Elements/DialogElementUrl.cs b/src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Elements/DialogElementUrl.cs
index c1734eeff..dfec7a92b 100644
--- a/src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Elements/DialogElementUrl.cs
+++ b/src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Elements/DialogElementUrl.cs
@@ -9,7 +9,7 @@ public class DialogElementUrl : IEntity
public DateTimeOffset UpdatedAt { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
// === Dependent relationships ===
public DialogElementUrlConsumerType.Values ConsumerTypeId { get; set; }
diff --git a/src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs b/src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs
index 14287ac7a..306a4f5cf 100644
--- a/src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs
+++ b/src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs
@@ -137,7 +137,7 @@ public sealed class ElementUrl
{
public Guid Id { get; set; }
public Uri Url { get; set; } = null!;
- public string? MimeType { get; set; }
+ public string? MediaType { get; set; }
public ElementUrlConsumer ConsumerType { get; set; }
}
diff --git a/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.Designer.cs b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.Designer.cs
new file mode 100644
index 000000000..bc7e51208
--- /dev/null
+++ b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.Designer.cs
@@ -0,0 +1,1292 @@
+//
+using System;
+using Digdir.Domain.Dialogporten.Infrastructure.Persistence;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace Digdir.Domain.Dialogporten.Infrastructure.Persistence.Migrations
+{
+ [DbContext(typeof(DialogDbContext))]
+ [Migration("20240605092550_RenameMimeTypeToMediaType")]
+ partial class RenameMimeTypeToMediaType
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.6")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("Action")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("AuthorizationAttribute")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogElementId")
+ .HasColumnType("uuid");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogElementId");
+
+ b.HasIndex("DialogId");
+
+ b.ToTable("DialogApiAction");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiActionEndpoint", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("ActionId")
+ .HasColumnType("uuid");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Deprecated")
+ .HasColumnType("boolean");
+
+ b.Property("DocumentationUrl")
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("HttpMethodId")
+ .HasColumnType("integer");
+
+ b.Property("RequestSchema")
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("ResponseSchema")
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("SunsetAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("Version")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ActionId");
+
+ b.HasIndex("HttpMethodId");
+
+ b.ToTable("DialogApiActionEndpoint");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("Action")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("AuthorizationAttribute")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("IsBackChannel")
+ .HasColumnType("boolean");
+
+ b.Property("IsDeleteAction")
+ .HasColumnType("boolean");
+
+ b.Property("PriorityId")
+ .HasColumnType("integer");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogId");
+
+ b.HasIndex("PriorityId");
+
+ b.ToTable("DialogGuiAction");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiActionPriority", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("DialogGuiActionPriority");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "Primary"
+ },
+ new
+ {
+ Id = 2,
+ Name = "Secondary"
+ },
+ new
+ {
+ Id = 3,
+ Name = "Tertiary"
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogElementId")
+ .HasColumnType("uuid");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("ExtendedType")
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("RelatedActivityId")
+ .HasColumnType("uuid");
+
+ b.Property("TypeId")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogElementId");
+
+ b.HasIndex("DialogId");
+
+ b.HasIndex("RelatedActivityId");
+
+ b.HasIndex("TypeId");
+
+ b.ToTable("DialogActivity");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("DialogActivityType");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "Submission"
+ },
+ new
+ {
+ Id = 2,
+ Name = "Feedback"
+ },
+ new
+ {
+ Id = 3,
+ Name = "Information"
+ },
+ new
+ {
+ Id = 4,
+ Name = "Error"
+ },
+ new
+ {
+ Id = 5,
+ Name = "Closed"
+ },
+ new
+ {
+ Id = 7,
+ Name = "Forwarded"
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("TypeId")
+ .HasColumnType("integer");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TypeId");
+
+ b.HasIndex("DialogId", "TypeId")
+ .IsUnique();
+
+ b.ToTable("DialogContent");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContentType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("MaxLength")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("OutputInList")
+ .HasColumnType("boolean");
+
+ b.Property("RenderAsHtml")
+ .HasColumnType("boolean");
+
+ b.Property("Required")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.ToTable("DialogContentType");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ MaxLength = 255,
+ Name = "Title",
+ OutputInList = true,
+ RenderAsHtml = false,
+ Required = true
+ },
+ new
+ {
+ Id = 2,
+ MaxLength = 255,
+ Name = "SenderName",
+ OutputInList = true,
+ RenderAsHtml = false,
+ Required = false
+ },
+ new
+ {
+ Id = 3,
+ MaxLength = 255,
+ Name = "Summary",
+ OutputInList = true,
+ RenderAsHtml = false,
+ Required = true
+ },
+ new
+ {
+ Id = 4,
+ MaxLength = 1023,
+ Name = "AdditionalInfo",
+ OutputInList = false,
+ RenderAsHtml = true,
+ Required = false
+ },
+ new
+ {
+ Id = 5,
+ MaxLength = 20,
+ Name = "ExtendedStatus",
+ OutputInList = true,
+ RenderAsHtml = false,
+ Required = false
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Deleted")
+ .HasColumnType("boolean");
+
+ b.Property("DeletedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DueAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExpiresAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExtendedStatus")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ExternalReference")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("Org")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)")
+ .UseCollation("C");
+
+ b.Property("Party")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)")
+ .UseCollation("C");
+
+ b.Property("Progress")
+ .HasColumnType("integer");
+
+ b.Property("Revision")
+ .IsConcurrencyToken()
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("ServiceResource")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)")
+ .UseCollation("C");
+
+ b.Property("ServiceResourceType")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("StatusId")
+ .HasColumnType("integer");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("VisibleFrom")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreatedAt");
+
+ b.HasIndex("DueAt");
+
+ b.HasIndex("Org");
+
+ b.HasIndex("Party");
+
+ b.HasIndex("ServiceResource");
+
+ b.HasIndex("StatusId");
+
+ b.HasIndex("UpdatedAt");
+
+ b.ToTable("Dialog", (string)null);
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSearchTag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(63)
+ .HasColumnType("character varying(63)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogId", "Value")
+ .IsUnique();
+
+ b.ToTable("DialogSearchTag");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("EndUserId")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("EndUserName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogId");
+
+ b.ToTable("DialogSeenLog");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogStatus", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("DialogStatus");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "New"
+ },
+ new
+ {
+ Id = 2,
+ Name = "InProgress"
+ },
+ new
+ {
+ Id = 3,
+ Name = "Waiting"
+ },
+ new
+ {
+ Id = 4,
+ Name = "Signing"
+ },
+ new
+ {
+ Id = 5,
+ Name = "Cancelled"
+ },
+ new
+ {
+ Id = 6,
+ Name = "Completed"
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("AuthorizationAttribute")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogId")
+ .HasColumnType("uuid");
+
+ b.Property("ExternalReference")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("RelatedDialogElementId")
+ .HasColumnType("uuid");
+
+ b.Property("Type")
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DialogId");
+
+ b.HasIndex("RelatedDialogElementId");
+
+ b.ToTable("DialogElement");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementUrl", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("ConsumerTypeId")
+ .HasColumnType("integer");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("DialogElementId")
+ .HasColumnType("uuid");
+
+ b.Property("MediaType")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(1023)
+ .HasColumnType("character varying(1023)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ConsumerTypeId");
+
+ b.HasIndex("DialogElementId");
+
+ b.ToTable("DialogElementUrl");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementUrlConsumerType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("DialogElementUrlConsumerType");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "Gui"
+ },
+ new
+ {
+ Id = 2,
+ Name = "Api"
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Http.HttpVerb", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("HttpVerb");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "GET"
+ },
+ new
+ {
+ Id = 2,
+ Name = "POST"
+ },
+ new
+ {
+ Id = 3,
+ Name = "PUT"
+ },
+ new
+ {
+ Id = 4,
+ Name = "PATCH"
+ },
+ new
+ {
+ Id = 5,
+ Name = "DELETE"
+ },
+ new
+ {
+ Id = 6,
+ Name = "HEAD"
+ },
+ new
+ {
+ Id = 7,
+ Name = "OPTIONS"
+ },
+ new
+ {
+ Id = 8,
+ Name = "TRACE"
+ },
+ new
+ {
+ Id = 9,
+ Name = "CONNECT"
+ });
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Localizations.Localization", b =>
+ {
+ b.Property("LocalizationSetId")
+ .HasColumnType("uuid");
+
+ b.Property("CultureCode")
+ .HasMaxLength(15)
+ .HasColumnType("character varying(15)");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(4095)
+ .HasColumnType("character varying(4095)");
+
+ b.HasKey("LocalizationSetId", "CultureCode");
+
+ b.ToTable("Localization");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasDefaultValueSql("gen_random_uuid()");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasDefaultValueSql("current_timestamp at time zone 'utc'");
+
+ b.Property("Discriminator")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("Id");
+
+ b.ToTable("LocalizationSet");
+
+ b.HasDiscriminator("Discriminator").HasValue("LocalizationSet");
+
+ b.UseTphMappingStrategy();
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Outboxes.OutboxMessage", b =>
+ {
+ b.Property("EventId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("EventPayload")
+ .IsRequired()
+ .HasColumnType("jsonb");
+
+ b.Property("EventType")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("EventId");
+
+ b.ToTable("OutboxMessage");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Outboxes.OutboxMessageConsumer", b =>
+ {
+ b.Property("EventId")
+ .HasColumnType("uuid");
+
+ b.Property("ConsumerName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("EventId", "ConsumerName");
+
+ b.ToTable("OutboxMessageConsumer");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiActionTitle", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("GuiActionId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("GuiActionId")
+ .IsUnique();
+
+ b.HasDiscriminator().HasValue("DialogGuiActionTitle");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityDescription", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("ActivityId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("ActivityId")
+ .IsUnique();
+
+ b.ToTable("LocalizationSet", t =>
+ {
+ t.Property("ActivityId")
+ .HasColumnName("DialogActivityDescription_ActivityId");
+ });
+
+ b.HasDiscriminator().HasValue("DialogActivityDescription");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityPerformedBy", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("ActivityId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("ActivityId")
+ .IsUnique();
+
+ b.HasDiscriminator().HasValue("DialogActivityPerformedBy");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContentValue", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("DialogContentId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("DialogContentId")
+ .IsUnique();
+
+ b.HasDiscriminator().HasValue("DialogContentValue");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLogVia", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("DialogSeenLogId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("DialogSeenLogId")
+ .IsUnique();
+
+ b.HasDiscriminator().HasValue("DialogSeenLogVia");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementDisplayName", b =>
+ {
+ b.HasBaseType("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet");
+
+ b.Property("ElementId")
+ .HasColumnType("uuid");
+
+ b.HasIndex("ElementId")
+ .IsUnique();
+
+ b.HasDiscriminator().HasValue("DialogElementDisplayName");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiAction", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", "DialogElement")
+ .WithMany("ApiActions")
+ .HasForeignKey("DialogElementId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("ApiActions")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+
+ b.Navigation("DialogElement");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiActionEndpoint", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiAction", "Action")
+ .WithMany("Endpoints")
+ .HasForeignKey("ActionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Http.HttpVerb", "HttpMethod")
+ .WithMany()
+ .HasForeignKey("HttpMethodId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Action");
+
+ b.Navigation("HttpMethod");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiAction", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("GuiActions")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiActionPriority", "Priority")
+ .WithMany()
+ .HasForeignKey("PriorityId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+
+ b.Navigation("Priority");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", "DialogElement")
+ .WithMany("Activities")
+ .HasForeignKey("DialogElementId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("Activities")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", "RelatedActivity")
+ .WithMany("RelatedActivities")
+ .HasForeignKey("RelatedActivityId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityType", "Type")
+ .WithMany()
+ .HasForeignKey("TypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+
+ b.Navigation("DialogElement");
+
+ b.Navigation("RelatedActivity");
+
+ b.Navigation("Type");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContent", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("Content")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContentType", "Type")
+ .WithMany()
+ .HasForeignKey("TypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+
+ b.Navigation("Type");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogStatus", "Status")
+ .WithMany()
+ .HasForeignKey("StatusId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("Status");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSearchTag", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("SearchTags")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLog", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("SeenLog")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Dialog");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", "Dialog")
+ .WithMany("Elements")
+ .HasForeignKey("DialogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", "RelatedDialogElement")
+ .WithMany("RelatedDialogElements")
+ .HasForeignKey("RelatedDialogElementId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.Navigation("Dialog");
+
+ b.Navigation("RelatedDialogElement");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementUrl", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementUrlConsumerType", "ConsumerType")
+ .WithMany()
+ .HasForeignKey("ConsumerTypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", "DialogElement")
+ .WithMany("Urls")
+ .HasForeignKey("DialogElementId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ConsumerType");
+
+ b.Navigation("DialogElement");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Localizations.Localization", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet", "LocalizationSet")
+ .WithMany("Localizations")
+ .HasForeignKey("LocalizationSetId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("LocalizationSet");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Outboxes.OutboxMessageConsumer", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Outboxes.OutboxMessage", "OutboxMessage")
+ .WithMany("OutboxMessageConsumers")
+ .HasForeignKey("EventId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("OutboxMessage");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiActionTitle", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiAction", "GuiAction")
+ .WithOne("Title")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiActionTitle", "GuiActionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("GuiAction");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityDescription", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", "Activity")
+ .WithOne("Description")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityDescription", "ActivityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Activity");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityPerformedBy", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", "Activity")
+ .WithOne("PerformedBy")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivityPerformedBy", "ActivityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Activity");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContentValue", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContent", "DialogContent")
+ .WithOne("Value")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContentValue", "DialogContentId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("DialogContent");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLogVia", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLog", "DialogSeenLog")
+ .WithOne("Via")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLogVia", "DialogSeenLogId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("DialogSeenLog");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementDisplayName", b =>
+ {
+ b.HasOne("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", "Element")
+ .WithOne("DisplayName")
+ .HasForeignKey("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElementDisplayName", "ElementId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Element");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogApiAction", b =>
+ {
+ b.Navigation("Endpoints");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Actions.DialogGuiAction", b =>
+ {
+ b.Navigation("Title");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Activities.DialogActivity", b =>
+ {
+ b.Navigation("Description");
+
+ b.Navigation("PerformedBy");
+
+ b.Navigation("RelatedActivities");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Content.DialogContent", b =>
+ {
+ b.Navigation("Value")
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogEntity", b =>
+ {
+ b.Navigation("Activities");
+
+ b.Navigation("ApiActions");
+
+ b.Navigation("Content");
+
+ b.Navigation("Elements");
+
+ b.Navigation("GuiActions");
+
+ b.Navigation("SearchTags");
+
+ b.Navigation("SeenLog");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.DialogSeenLog", b =>
+ {
+ b.Navigation("Via");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Dialogs.Entities.Elements.DialogElement", b =>
+ {
+ b.Navigation("Activities");
+
+ b.Navigation("ApiActions");
+
+ b.Navigation("DisplayName");
+
+ b.Navigation("RelatedDialogElements");
+
+ b.Navigation("Urls");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Localizations.LocalizationSet", b =>
+ {
+ b.Navigation("Localizations");
+ });
+
+ modelBuilder.Entity("Digdir.Domain.Dialogporten.Domain.Outboxes.OutboxMessage", b =>
+ {
+ b.Navigation("OutboxMessageConsumers");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.cs b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.cs
new file mode 100644
index 000000000..5ec6d6e0d
--- /dev/null
+++ b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20240605092550_RenameMimeTypeToMediaType.cs
@@ -0,0 +1,28 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Digdir.Domain.Dialogporten.Infrastructure.Persistence.Migrations
+{
+ ///
+ public partial class RenameMimeTypeToMediaType : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "MimeType",
+ table: "DialogElementUrl",
+ newName: "MediaType");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "MediaType",
+ table: "DialogElementUrl",
+ newName: "MimeType");
+ }
+ }
+}
diff --git a/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/DialogDbContextModelSnapshot.cs b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/DialogDbContextModelSnapshot.cs
index 1392a070d..23b3d9578 100644
--- a/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/DialogDbContextModelSnapshot.cs
+++ b/src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/DialogDbContextModelSnapshot.cs
@@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "8.0.4")
+ .HasAnnotation("ProductVersion", "8.0.6")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -663,7 +663,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property("DialogElementId")
.HasColumnType("uuid");
- b.Property("MimeType")
+ b.Property("MediaType")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs
index b2dc22d22..740d0dc58 100644
--- a/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs
+++ b/src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs
@@ -97,7 +97,7 @@ public static RouteHandlerBuilder SetDescription(RouteHandlerBuilder builder) =>
new UpdateDialogDialogElementUrlDto
{
Id = Guid.Parse("858177cb-8584-4d10-a086-3a5defa7a6c3"),
- MimeType = "application/json",
+ MediaType = "application/json",
Url = new Uri("http://example.com/some-url")
}
]
diff --git a/src/Digdir.Tool.Dialogporten.GenerateFakeData/DialogGenerator.cs b/src/Digdir.Tool.Dialogporten.GenerateFakeData/DialogGenerator.cs
index bfff99b08..73fb838ad 100644
--- a/src/Digdir.Tool.Dialogporten.GenerateFakeData/DialogGenerator.cs
+++ b/src/Digdir.Tool.Dialogporten.GenerateFakeData/DialogGenerator.cs
@@ -281,7 +281,7 @@ public static List GenerateFakeDialogElements(int?
.Generate(count ?? new Randomizer().Number(1, 6));
}
- private static readonly string[] MimeTypes = [
+ private static readonly string[] MediaTypes = [
"application/json",
"application/xml",
"text/html",
@@ -293,7 +293,7 @@ public static List GenerateFakeDialogElementUrl
return new Faker()
.RuleFor(o => o.Url, f => new Uri(f.Internet.UrlWithPath()))
.RuleFor(o => o.ConsumerType, f => f.PickRandom())
- .RuleFor(o => o.MimeType, f => f.PickRandom(MimeTypes))
+ .RuleFor(o => o.MediaType, f => f.PickRandom(MediaTypes))
.Generate(new Randomizer().Number(1, 3));
}