//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Microsoft.SelfService.Portal.Core.API.Context;
#nullable disable
namespace Microsoft.SelfService.Portal.Core.API.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20260709091610_SeedCredentialSecretsAndDeploymentArtifacts")]
partial class SeedCredentialSecretsAndDeploymentArtifacts
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DefinitionHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(5);
b.Property("Kind")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("nvarchar(32)")
.HasColumnOrder(2);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(3);
b.Property("PropertiesJson")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("TemplateRevisionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.HasKey("Id");
b.HasIndex("TemplateRevisionId", "Kind", "Name")
.IsUnique()
.HasFilter("[TemplateRevisionId] IS NOT NULL");
b.ToTable("ConfigurationDefinitions", t =>
{
t.HasCheckConstraint("CK_ConfigurationDefinitions_PropertiesJson_IsJson", "ISJSON([PropertiesJson]) = 1");
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("ConfigurationDefinitionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("ScopeId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(3);
b.Property("ScopeType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(2);
b.Property("SortOrder")
.HasColumnType("int")
.HasColumnOrder(8);
b.Property("SourcePath")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.Property("ValueHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(7);
b.Property("ValueJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("ValueSourceType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(4);
b.HasKey("Id");
b.HasIndex("ConfigurationDefinitionId", "ScopeType", "ScopeId", "SortOrder");
b.ToTable("ConfigurationValues", t =>
{
t.HasCheckConstraint("CK_ConfigurationValues_ValueJson_IsJson", "[ValueJson] IS NULL OR ISJSON([ValueJson]) = 1");
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.CredentialSecretModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("IsEnabled")
.HasColumnType("bit")
.HasColumnOrder(6);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(1);
b.Property("SecretType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("SecretValue")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.Property("UserName")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("CredentialSecrets", t =>
{
t.HasCheckConstraint("CK_CredentialSecrets_MetadataJson_IsJson", "[MetadataJson] IS NULL OR ISJSON([MetadataJson]) = 1");
});
b.HasData(
new
{
Id = new Guid("90000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
IsEnabled = true,
MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Windows/SharePoint/SetupAccount",
SecretType = "Credential",
SecretValue = "DemoOnly-DoNotUseInProduction!",
UserName = "CONTOSO\\svc_sp_setup"
},
new
{
Id = new Guid("90000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
IsEnabled = true,
MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Windows/SharePoint/FarmAccount",
SecretType = "Credential",
SecretValue = "DemoOnly-DoNotUseInProduction!",
UserName = "CONTOSO\\svc_sp_farm"
},
new
{
Id = new Guid("90000000-0000-0000-0000-000000000003"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
IsEnabled = true,
MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Windows/SharePoint/FarmPassphrase",
SecretType = "Secret",
SecretValue = "DemoOnly-DoNotUseInProduction!"
},
new
{
Id = new Guid("90000000-0000-0000-0000-000000000004"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
IsEnabled = true,
MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Windows/SharePoint/DefaultServiceAccount",
SecretType = "Credential",
SecretValue = "DemoOnly-DoNotUseInProduction!",
UserName = "CONTOSO\\svc_sp_service"
},
new
{
Id = new Guid("90000000-0000-0000-0000-000000000005"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
IsEnabled = true,
MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Windows/SharePoint/SearchAccount",
SecretType = "Credential",
SecretValue = "DemoOnly-DoNotUseInProduction!",
UserName = "CONTOSO\\svc_sp_search"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("ArtifactType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(4);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("DeploymentJson")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("DeploymentTargetId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.Property("InputHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(10);
b.Property("IsStale")
.HasColumnType("bit")
.HasColumnOrder(12);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("OutputHash")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(11);
b.Property("ResolvedJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(8);
b.Property("SourceJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(7);
b.Property("SourceSnapshotJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(9);
b.Property("StaleReasonJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(13);
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.Property("TargetId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(3);
b.HasKey("Id");
b.HasIndex("DeploymentGroupId");
b.HasIndex("TargetId", "DeploymentGroupId");
b.ToTable("DeploymentArtifacts", t =>
{
t.HasCheckConstraint("CK_DeploymentArtifacts_DeploymentJson_IsJson", "ISJSON([DeploymentJson]) = 1");
t.HasCheckConstraint("CK_DeploymentArtifacts_ResolvedJson_IsJson", "[ResolvedJson] IS NULL OR ISJSON([ResolvedJson]) = 1");
t.HasCheckConstraint("CK_DeploymentArtifacts_SourceJson_IsJson", "[SourceJson] IS NULL OR ISJSON([SourceJson]) = 1");
t.HasCheckConstraint("CK_DeploymentArtifacts_SourceSnapshotJson_IsJson", "[SourceSnapshotJson] IS NULL OR ISJSON([SourceSnapshotJson]) = 1");
});
b.HasData(
new
{
Id = new Guid("85000000-0000-0000-0000-000000000101"),
ArtifactType = "ResolvedConfigurationData",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
DeploymentJson = "{\n \"metadata\": {\n \"name\": \"Contoso-Test-SharePoint\",\n \"deploymentId\": \"8f6c2c1a\",\n \"source\": \"DemoData\"\n },\n \"parameters\": {\n \"DatabasePrefix\": \"SharePoint_Contoso_Test\"\n },\n \"variables\": {\n \"DatabasePrefix\": \"SharePoint_Contoso_Test\",\n \"ServiceDbPrefix\": \"SharePoint_Contoso_Test_Services\",\n \"ConfigDbName\": \"SharePoint_Contoso_Test_Farm_Config\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"CLD-SHP-01\", \"RunCentralAdministration\": true },\n { \"NodeName\": \"CLD-SHP-02\", \"RunCentralAdministration\": false },\n { \"NodeName\": \"CLD-SHP-03\", \"RunCentralAdministration\": false }\n ],\n \"NonNodeData\": {\n \"LocalConfigurationManager\": {\n \"ConfigurationMode\": \"ApplyOnly\"\n }\n }\n }\n}",
InputHash = "F081B9BACB21534D9673317615B990CC3836D68416CD6C94E06045E524640020",
IsStale = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
OutputHash = "8A49E86D9D571FDE9FE243849A5399A73750798F165B0D9DCE1318B8561CEF01",
ResolvedJson = "{\n \"metadata\": {\n \"name\": \"Contoso-Test-SharePoint\",\n \"deploymentId\": \"8f6c2c1a\",\n \"source\": \"DemoData\"\n },\n \"parameters\": {\n \"DatabasePrefix\": \"SharePoint_Contoso_Test\"\n },\n \"variables\": {\n \"DatabasePrefix\": \"SharePoint_Contoso_Test\",\n \"ServiceDbPrefix\": \"SharePoint_Contoso_Test_Services\",\n \"ConfigDbName\": \"SharePoint_Contoso_Test_Farm_Config\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"CLD-SHP-01\", \"RunCentralAdministration\": true },\n { \"NodeName\": \"CLD-SHP-02\", \"RunCentralAdministration\": false },\n { \"NodeName\": \"CLD-SHP-03\", \"RunCentralAdministration\": false }\n ],\n \"NonNodeData\": {\n \"LocalConfigurationManager\": {\n \"ConfigurationMode\": \"ApplyOnly\"\n }\n }\n }\n}",
SourceJson = "{\"source\":\"DemoData\",\"composition\":\"Test.Merge.ps1\"}",
SourceSnapshotJson = "{\n \"templateRevisions\": [\n {\n \"id\": \"72000000-0000-0000-0000-000000000101\",\n \"templateVersionId\": \"71000000-0000-0000-0000-000000000101\",\n \"role\": \"Environment\",\n \"alias\": \"Environment-Test\",\n \"hash\": \"58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646\"\n },\n {\n \"id\": \"72000000-0000-0000-0000-000000000102\",\n \"templateVersionId\": \"71000000-0000-0000-0000-000000000102\",\n \"role\": \"Domain\",\n \"alias\": \"Domain-Contoso\",\n \"hash\": \"B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667\"\n },\n {\n \"id\": \"72000000-0000-0000-0000-000000000103\",\n \"templateVersionId\": \"71000000-0000-0000-0000-000000000103\",\n \"role\": \"Service\",\n \"alias\": \"Service-SharePoint-Contoso\",\n \"hash\": \"E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69\"\n },\n {\n \"id\": \"72000000-0000-0000-0000-000000000104\",\n \"templateVersionId\": \"71000000-0000-0000-0000-000000000104\",\n \"role\": \"Stage\",\n \"alias\": \"Stage-Install\",\n \"hash\": \"ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1\"\n }\n ],\n \"targets\": [\n { \"id\": \"30000000-0000-0000-0000-000000000101\", \"nodeName\": \"CLD-SHP-01\" },\n { \"id\": \"30000000-0000-0000-0000-000000000102\", \"nodeName\": \"CLD-SHP-02\" },\n { \"id\": \"30000000-0000-0000-0000-000000000103\", \"nodeName\": \"CLD-SHP-03\" }\n ]\n}",
Status = "Pending"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentRuleId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(3);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Status")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4)
.HasDefaultValueSql("'New'");
b.Property("TemplateId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.HasKey("Id");
b.HasIndex("DeploymentRuleId");
b.HasIndex("TemplateId");
b.ToTable("DeploymentBatches", (string)null);
b.HasData(
new
{
Id = new Guid("80000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateId = new Guid("70000000-0000-0000-0000-000000000003")
},
new
{
Id = new Guid("80000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateId = new Guid("70000000-0000-0000-0000-000000000103")
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b =>
{
b.Property("TargetId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(3);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeploymentBatchId")
.HasColumnOrder(2);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("CurrentArtifactId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(5);
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("JSONData")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(7);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("OverridesJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(8);
b.Property("SourceJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(9);
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("TemplateRevisionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(4);
b.HasKey("TargetId", "DeploymentGroupId");
b.HasIndex("CurrentArtifactId");
b.HasIndex("DeploymentGroupId");
b.HasIndex("TemplateRevisionId");
b.ToTable("DeploymentExecutions", (string)null);
b.HasData(
new
{
TargetId = new Guid("30000000-0000-0000-0000-000000000004"),
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Id = new Guid("81000000-0000-0000-0000-000000000001"),
JSONData = "{\"role\":\"WebFrontEnd\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003")
},
new
{
TargetId = new Guid("30000000-0000-0000-0000-000000000005"),
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Id = new Guid("81000000-0000-0000-0000-000000000002"),
JSONData = "{\"role\":\"Application\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003")
},
new
{
TargetId = new Guid("30000000-0000-0000-0000-000000000101"),
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Id = new Guid("81000000-0000-0000-0000-000000000101"),
JSONData = "{\"role\":\"Node\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103")
},
new
{
TargetId = new Guid("30000000-0000-0000-0000-000000000102"),
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Id = new Guid("81000000-0000-0000-0000-000000000102"),
JSONData = "{\"role\":\"Node\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103")
},
new
{
TargetId = new Guid("30000000-0000-0000-0000-000000000103"),
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Id = new Guid("81000000-0000-0000-0000-000000000103"),
JSONData = "{\"role\":\"Node\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Status = "Pending",
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103")
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("DeploymentTemplateSelectionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.Property("IsOverride")
.HasColumnType("bit")
.HasColumnOrder(6);
b.Property("IsSecretReference")
.HasColumnType("bit")
.HasColumnOrder(5);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(3);
b.Property("ValueJson")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.HasKey("Id");
b.HasIndex("DeploymentTemplateSelectionId");
b.HasIndex("DeploymentGroupId", "Name")
.IsUnique()
.HasFilter("[DeploymentTemplateSelectionId] IS NULL");
b.HasIndex("DeploymentGroupId", "DeploymentTemplateSelectionId", "Name")
.IsUnique()
.HasFilter("[DeploymentTemplateSelectionId] IS NOT NULL");
b.ToTable("DeploymentParameterValues", t =>
{
t.HasCheckConstraint("CK_DeploymentParameterValues_ValueJson_IsJson", "ISJSON([ValueJson]) = 1");
});
b.HasData(
new
{
Id = new Guid("83000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
DeploymentTemplateSelectionId = new Guid("82000000-0000-0000-0000-000000000001"),
IsOverride = true,
IsSecretReference = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "DatabasePrefix",
ValueJson = "{\"value\":\"SharePoint_Contoso_Test\"}"
},
new
{
Id = new Guid("83000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
DeploymentTemplateSelectionId = new Guid("82000000-0000-0000-0000-000000000001"),
IsOverride = true,
IsSecretReference = true,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "FarmAccount",
ValueJson = "{\"provider\":\"SecretManagement\",\"vault\":\"ContosoDemo\",\"name\":\"Windows/SharePoint/FarmAccount\"}"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Description")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("IsActive")
.HasColumnType("bit")
.HasColumnOrder(3);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.HasKey("Id");
b.ToTable("DeploymentRules");
b.HasData(
new
{
Id = new Guid("60000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "Validate input, wait for approval, then provision targets.",
IsActive = true,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Standard Provisioning"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentRuleId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.Property("RequiresApproval")
.HasColumnType("bit")
.HasColumnOrder(5);
b.Property("SortOrder")
.HasColumnType("int")
.HasColumnOrder(2);
b.Property("StepType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.HasKey("Id");
b.HasIndex("DeploymentRuleId");
b.ToTable("DeploymentRuleSteps");
b.HasData(
new
{
Id = new Guid("60000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"action\":\"validate\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Validate configuration",
RequiresApproval = false,
SortOrder = 10,
StepType = "Provision"
},
new
{
Id = new Guid("60000000-0000-0000-0000-000000000102"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"approverGroup\":\"Platform Owners\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Approve deployment",
RequiresApproval = true,
SortOrder = 20,
StepType = "Approval"
},
new
{
Id = new Guid("60000000-0000-0000-0000-000000000103"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"action\":\"deploy\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Provision workload",
RequiresApproval = false,
SortOrder = 30,
StepType = "Provision"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("NodeDataJson")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.Property("RoleKey")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(3);
b.Property("SortOrder")
.HasColumnType("int")
.HasColumnOrder(4);
b.Property("TargetId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.HasKey("Id");
b.HasIndex("TargetId");
b.HasIndex("DeploymentGroupId", "TargetId", "RoleKey")
.IsUnique();
b.ToTable("DeploymentTargetAssignments", t =>
{
t.HasCheckConstraint("CK_DeploymentTargetAssignments_NodeDataJson_IsJson", "ISJSON([NodeDataJson]) = 1");
});
b.HasData(
new
{
Id = new Guid("84000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
NodeDataJson = "{\"nodeName\":\"CT-SHP-01\"}",
RoleKey = "WebFrontEnd",
SortOrder = 10,
TargetId = new Guid("30000000-0000-0000-0000-000000000004")
},
new
{
Id = new Guid("84000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
NodeDataJson = "{\"nodeName\":\"CT-SHP-02\"}",
RoleKey = "Application",
SortOrder = 20,
TargetId = new Guid("30000000-0000-0000-0000-000000000005")
},
new
{
Id = new Guid("84000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
NodeDataJson = "{\"nodeName\":\"CLD-SHP-01\",\"RunCentralAdministration\":true}",
RoleKey = "Node",
SortOrder = 10,
TargetId = new Guid("30000000-0000-0000-0000-000000000101")
},
new
{
Id = new Guid("84000000-0000-0000-0000-000000000102"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
NodeDataJson = "{\"nodeName\":\"CLD-SHP-02\",\"RunCentralAdministration\":false}",
RoleKey = "Node",
SortOrder = 20,
TargetId = new Guid("30000000-0000-0000-0000-000000000102")
},
new
{
Id = new Guid("84000000-0000-0000-0000-000000000103"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
NodeDataJson = "{\"nodeName\":\"CLD-SHP-03\",\"RunCentralAdministration\":false}",
RoleKey = "Node",
SortOrder = 30,
TargetId = new Guid("30000000-0000-0000-0000-000000000103")
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Alias")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("SortOrder")
.HasColumnType("int")
.HasColumnOrder(5);
b.Property("TemplateRevisionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(3);
b.Property("TemplateRole")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("TemplateVersionId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.HasKey("Id");
b.HasIndex("TemplateRevisionId");
b.HasIndex("TemplateVersionId");
b.HasIndex("DeploymentGroupId", "SortOrder")
.IsUnique();
b.ToTable("DeploymentTemplateSelections");
b.HasData(
new
{
Id = new Guid("82000000-0000-0000-0000-000000000001"),
Alias = "SharePoint",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000001"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
SortOrder = 10,
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003"),
TemplateRole = "Service",
TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003")
},
new
{
Id = new Guid("82000000-0000-0000-0000-000000000101"),
Alias = "Environment-Test",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
SortOrder = 10,
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101"),
TemplateRole = "Environment",
TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101")
},
new
{
Id = new Guid("82000000-0000-0000-0000-000000000102"),
Alias = "Domain-Contoso",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
SortOrder = 20,
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102"),
TemplateRole = "Domain",
TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102")
},
new
{
Id = new Guid("82000000-0000-0000-0000-000000000103"),
Alias = "Service-SharePoint-Contoso",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
SortOrder = 30,
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103"),
TemplateRole = "Service",
TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103")
},
new
{
Id = new Guid("82000000-0000-0000-0000-000000000104"),
Alias = "Stage-Install",
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DeploymentGroupId = new Guid("80000000-0000-0000-0000-000000000101"),
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
SortOrder = 40,
TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000104"),
TemplateRole = "Stage",
TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104")
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("FQDN")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.Property("NetBIOS")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.HasKey("Id");
b.ToTable("Domains");
b.HasData(
new
{
Id = new Guid("20000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
FQDN = "corp.contoso.com",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Central Management",
NetBIOS = "CONTOSO"
},
new
{
Id = new Guid("20000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
FQDN = "resource.contoso.com",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Resource Domain",
NetBIOS = "RESOURCE"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b =>
{
b.Property("EnvironmentId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0);
b.Property("DomainId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("Created")
.HasColumnType("datetime2")
.HasColumnOrder(52);
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Modified")
.HasColumnType("datetime2")
.HasColumnOrder(50);
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.HasKey("EnvironmentId", "DomainId");
b.HasIndex("DomainId");
b.ToTable("EnvironmentDomains");
b.HasData(
new
{
EnvironmentId = new Guid("10000000-0000-0000-0000-000000000001"),
DomainId = new Guid("20000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed"
},
new
{
EnvironmentId = new Guid("10000000-0000-0000-0000-000000000002"),
DomainId = new Guid("20000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed"
},
new
{
EnvironmentId = new Guid("10000000-0000-0000-0000-000000000002"),
DomainId = new Guid("20000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("EnvironmentType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("HostingType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(7);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.Property("ProviderType")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("SubscriptionId")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("TenantId")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.HasKey("Id");
b.ToTable("Environments");
b.HasData(
new
{
Id = new Guid("10000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
EnvironmentType = "Test",
HostingType = "OnPrem",
MetadataJson = "{\"location\":\"Datacenter A\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Contoso Test"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
EnvironmentType = "Production",
HostingType = "OnPrem",
MetadataJson = "{\"location\":\"Datacenter A\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Contoso Production"
},
new
{
Id = new Guid("10000000-0000-0000-0000-000000000003"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
EnvironmentType = "Production",
HostingType = "M365Tenant",
MetadataJson = "{\"tenant\":\"contoso.onmicrosoft.com\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Contoso M365",
ProviderType = "Microsoft365",
TenantId = "11111111-1111-1111-1111-111111111111"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.Property("ParentCategoryName")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("showOrder")
.HasColumnType("int")
.HasColumnOrder(3);
b.HasKey("Id");
b.ToTable("OptionCategories");
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.Property("OptionCategoryId")
.HasColumnType("uniqueidentifier");
b.Property("OptionType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("OptionValue")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.HasKey("Id");
b.HasIndex("OptionCategoryId");
b.ToTable("Options");
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Attempts")
.HasColumnType("int")
.HasColumnOrder(4);
b.Property("CorrelationId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(13)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("ErrorMessage")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(10);
b.Property("Finished")
.HasColumnType("datetime2")
.HasColumnOrder(7);
b.Property("HeartbeatAt")
.HasColumnType("datetime2")
.HasColumnOrder(16);
b.Property("LockedBy")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(9);
b.Property("LockedUntil")
.HasColumnType("datetime2")
.HasColumnOrder(8);
b.Property("MaxAttempts")
.HasColumnType("int")
.HasColumnOrder(5);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(11);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("PayloadJson")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.Property("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(100)
.HasColumnOrder(14);
b.Property("RowVersion")
.IsConcurrencyToken()
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.Property("RuleSnapshotJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(12);
b.Property("ScheduledAt")
.HasColumnType("datetime2")
.HasColumnOrder(15);
b.Property("Started")
.HasColumnType("datetime2")
.HasColumnOrder(6);
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(2);
b.Property("Type")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.Property("WorkerName")
.HasColumnType("nvarchar(450)")
.HasColumnOrder(17);
b.HasKey("Id");
b.HasIndex("CorrelationId");
b.HasIndex("WorkerName");
b.HasIndex("Status", "ScheduledAt", "LockedUntil", "Priority", "Created");
b.ToTable("DeploymentJobs", (string)null);
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("ApprovalComment")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(10);
b.Property("ApprovedAt")
.HasColumnType("datetime2")
.HasColumnOrder(8);
b.Property("ApprovedBy")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(9);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DependsOnQueueJobStepId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DependsOnDeploymentJobStepId")
.HasColumnOrder(2);
b.Property("ErrorMessage")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(14);
b.Property("Finished")
.HasColumnType("datetime2")
.HasColumnOrder(12);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(7);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("OutputMetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(13);
b.Property("QueueJobId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeploymentJobId")
.HasColumnOrder(1);
b.Property("SortOrder")
.HasColumnType("int")
.HasColumnOrder(3);
b.Property("Started")
.HasColumnType("datetime2")
.HasColumnOrder(11);
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(6);
b.Property("StepType")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.HasKey("Id");
b.HasIndex("DependsOnQueueJobStepId");
b.HasIndex("QueueJobId", "Status", "SortOrder");
b.ToTable("DeploymentJobSteps", null, t =>
{
t.HasCheckConstraint("CK_DeploymentJobSteps_OutputMetadataJson_IsJson", "[OutputMetadataJson] IS NULL OR ISJSON([OutputMetadataJson]) = 1");
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Attempts")
.HasColumnType("int")
.HasColumnOrder(6);
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DeploymentGroupId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeploymentBatchId")
.HasColumnOrder(3);
b.Property("ErrorMessage")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(7);
b.Property("Finished")
.HasColumnType("datetime2")
.HasColumnOrder(9);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("OutputMetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(10);
b.Property("QueueJobId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeploymentJobId")
.HasColumnOrder(1);
b.Property("Started")
.HasColumnType("datetime2")
.HasColumnOrder(8);
b.Property("Status")
.IsRequired()
.HasColumnType("nvarchar(450)")
.HasColumnOrder(5);
b.Property("TargetId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(2);
b.Property("TemplateId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(4);
b.HasKey("Id");
b.HasIndex("QueueJobId", "Status");
b.ToTable("DeploymentJobTargets", null, t =>
{
t.HasCheckConstraint("CK_DeploymentJobTargets_OutputMetadataJson_IsJson", "[OutputMetadataJson] IS NULL OR ISJSON([OutputMetadataJson]) = 1");
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Description")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("IconKey")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("IsCloudService")
.HasColumnType("bit")
.HasColumnOrder(3);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(1);
b.HasKey("Id");
b.ToTable("Services");
b.HasData(
new
{
Id = new Guid("40000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "On-premises directory and identity service.",
IconKey = "network",
IsCloudService = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Active Directory"
},
new
{
Id = new Guid("40000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "Database platform for application workloads.",
IconKey = "database",
IsCloudService = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "SQL Server"
},
new
{
Id = new Guid("40000000-0000-0000-0000-000000000003"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "Collaboration platform for on-premises workloads.",
IconKey = "sharepoint",
IsCloudService = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "SharePoint Server"
},
new
{
Id = new Guid("40000000-0000-0000-0000-000000000004"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "Cloud collaboration workload in Microsoft 365.",
IconKey = "messages-square",
IsCloudService = true,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Microsoft Teams"
},
new
{
Id = new Guid("40000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "Reusable configuration-data template building blocks for deployment composition.",
IconKey = "braces",
IsCloudService = false,
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "DSC Configuration Data"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("Description")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(4);
b.Property("Key")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(3);
b.Property("ServiceId")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.HasKey("Id");
b.HasIndex("ServiceId");
b.ToTable("ServiceRoleDefinitions");
b.HasData(
new
{
Id = new Guid("41000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "SharePoint farm role.",
Key = "Farm",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Farm",
ServiceId = new Guid("40000000-0000-0000-0000-000000000003")
},
new
{
Id = new Guid("41000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "SharePoint web front-end role.",
Key = "WebFrontEnd",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Web Front End",
ServiceId = new Guid("40000000-0000-0000-0000-000000000003")
},
new
{
Id = new Guid("41000000-0000-0000-0000-000000000003"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "SharePoint service application role.",
Key = "Application",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Application",
ServiceId = new Guid("40000000-0000-0000-0000-000000000003")
},
new
{
Id = new Guid("41000000-0000-0000-0000-000000000004"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
Description = "SQL Server database role.",
Key = "Database",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Database",
ServiceId = new Guid("40000000-0000-0000-0000-000000000002")
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property("Created")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(52)
.HasDefaultValueSql("GETDATE()");
b.Property("CreatedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(53);
b.Property("DomainID")
.HasColumnType("uniqueidentifier")
.HasColumnOrder(1);
b.Property("ExternalId")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(5);
b.Property("MetadataJson")
.HasColumnType("nvarchar(max)")
.HasColumnOrder(6);
b.Property("Modified")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasColumnOrder(50)
.HasDefaultValueSql("GETDATE()");
b.Property("ModifiedBy")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(51);
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnOrder(2);
b.Property("ProviderType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(4);
b.Property("TargetType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnOrder(3);
b.HasKey("Id");
b.HasIndex("DomainID");
b.ToTable("Targets");
b.HasData(
new
{
Id = new Guid("30000000-0000-0000-0000-000000000001"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"DomainController\",\"environment\":\"Test\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CT-DC-01",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000002"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"DomainController\",\"environment\":\"Production\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CT-DC-02",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000003"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SqlServer\",\"environment\":\"Test\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CT-SQL-01",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000004"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SharePoint\",\"environment\":\"Test\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CT-SHP-01",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000005"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SharePoint\",\"environment\":\"Test\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CT-SHP-02",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000006"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
ExternalId = "11111111-1111-1111-1111-111111111111",
MetadataJson = "{\"environment\":\"Production\",\"workload\":\"M365\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "contoso.onmicrosoft.com",
ProviderType = "Microsoft365",
TargetType = "Tenant"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000007"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
ExternalId = "Teams.StandardUsers",
MetadataJson = "{\"workload\":\"Teams\",\"scope\":\"StandardUsers\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "Teams - Standard Users",
ProviderType = "Microsoft365",
TargetType = "PolicyScope"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000101"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SharePoint\",\"environment\":\"Test\",\"source\":\"Test.Merge.ps1\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CLD-SHP-01",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000102"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SharePoint\",\"environment\":\"Test\",\"source\":\"Test.Merge.ps1\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CLD-SHP-02",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
},
new
{
Id = new Guid("30000000-0000-0000-0000-000000000103"),
Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
CreatedBy = "DemoSeed",
DomainID = new Guid("20000000-0000-0000-0000-000000000001"),
MetadataJson = "{\"role\":\"SharePoint\",\"environment\":\"Test\",\"source\":\"Test.Merge.ps1\"}",
Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc),
ModifiedBy = "DemoSeed",
Name = "CLD-SHP-03",
ProviderType = "OnPrem",
TargetType = "VirtualMachine"
});
});
modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasColumnOrder(0)
.HasDefaultValueSql("NEWID()");
b.Property