From dc93ea08132668fdbd19d5c2e871f2b6ea721da8 Mon Sep 17 00:00:00 2001 From: Torsten Brendgen Date: Thu, 9 Jul 2026 14:44:38 +0200 Subject: [PATCH] feat: Implement API client and token models with hashing and JWT authentication - Added ApiClientModel and ApiTokenModel for managing API clients and tokens. - Introduced ConfigurationDefinitionModel and ConfigurationValueModel for configuration management. - Created CredentialSecretModel for storing credential secrets. - Developed DeploymentArtifactModel and DeploymentBatchModel for deployment management. - Enhanced DeploymentTargetModel and DeploymentTemplateSelectionModel to support template revisions. - Added TemplateRevisionModel and TemplateVersionModel for versioning templates. - Implemented ApiClientSecretHasher for secure secret hashing. - Created ApiTokenService for generating and validating JWT tokens. - Updated QueueJobService to handle deployment requests with artifacts. - Configured authentication settings in appsettings.json for JWT and Negotiate authentication. --- .gitignore | 18 +- .tests/Api.Tests.ps1 | 310 ++ .tests/BgwMerge.Api.Tests.ps1 | 421 -- .tests/Compare-BgwMergeWithApi.ps1 | 42 - .tests/OnPremClientCredentials.Api.Tests.ps1 | 137 + Context/DataContext.cs | 180 + Context/DemoData.cs | 376 +- Controllers/ApiTokenController.cs | 221 + Controllers/AuthController.cs | 94 + .../ConfigurationDefinitionController.cs | 266 + Controllers/ConfigurationValueController.cs | 106 + Controllers/CredentialSecretController.cs | 143 + Controllers/DeploymentArtifactController.cs | 198 + Controllers/DeploymentBatchController.cs | 17 +- Controllers/DeploymentController.cs | 3 +- Controllers/TemplateController.cs | 74 + Dto/Auth/CreateManagedTokenRequestDto.cs | 11 + Dto/Auth/CreateManagedTokenResponseDto.cs | 17 + Dto/Auth/GetManagedTokenDto.cs | 29 + Dto/Auth/TokenRequestDto.cs | 9 + Dto/Auth/TokenResponseDto.cs | 10 + .../Add/AddConfigurationDefinitionDto.cs | 10 + .../Edit/EditConfigurationDefinitionDto.cs | 10 + .../Get/GetConfigurationDefinitionDto.cs | 13 + .../Add/AddConfigurationValueDto.cs | 13 + .../Get/GetConfigurationValueDto.cs | 16 + .../Add/AddCredentialSecretDto.cs | 12 + .../Get/GetCredentialSecretDto.cs | 13 + .../Get/GetCredentialSecretValueDto.cs | 11 + Dto/Deployment/Add/AddDeploymentRequestDto.cs | 1 + .../Add/AddDeploymentArtifactDto.cs | 14 + .../Get/GetDeploymentArtifactDto.cs | 20 + .../Add/AddDeploymentTemplateSelectionDto.cs | 1 + .../Get/GetDeploymentTemplateSelectionDto.cs | 1 + .../Add/AddTemplateRevisionDto.cs | 10 + .../Get/GetTemplateRevisionDto.cs | 17 + Helper/MappingProfilesHelper.cs | 31 + Interfaces/IQueueJobService.cs | 2 +- Interfaces/ITemplateInterface.cs | 4 + Microsoft.SelfService.Portal.Core.API.csproj | 2 + ...ionArtifactsAndCredentialStore.Designer.cs | 3390 ++++++++++++ ...lateRevisionArtifactsAndCredentialStore.cs | 540 ++ ...lSecretsAndDeploymentArtifacts.Designer.cs | 3481 ++++++++++++ ...CredentialSecretsAndDeploymentArtifacts.cs | 68 + ...figurationDefinitionsAndValues.Designer.cs | 4689 ++++++++++++++++ ...2_SeedConfigurationDefinitionsAndValues.cs | 551 ++ ...0709102045_AddOnPremApiClients.Designer.cs | 4778 ++++++++++++++++ .../20260709102045_AddOnPremApiClients.cs | 56 + ...09110427_AddApiTokenManagement.Designer.cs | 4884 +++++++++++++++++ .../20260709110427_AddApiTokenManagement.cs | 71 + ...40_AddDemoApiClientTokenScopes.Designer.cs | 4884 +++++++++++++++++ ...60709110540_AddDemoApiClientTokenScopes.cs | 33 + Migrations/DataContextModelSnapshot.cs | 2198 +++++++- Models/ApiClientModel.cs | 28 + Models/ApiTokenModel.cs | 42 + Models/ConfigurationDefinitionModel.cs | 31 + Models/ConfigurationValueModel.cs | 52 + Models/CredentialSecretModel.cs | 25 + Models/DeploymentArtifactModel.cs | 58 + Models/DeploymentBatchModel.cs | 1 + Models/DeploymentTargetModel.cs | 13 +- Models/DeploymentTemplateSelectionModel.cs | 8 +- Models/TemplateRevisionModel.cs | 45 + Models/TemplateVersionModel.cs | 1 + Program.cs | 85 +- Repository/DeploymentBatchRepository.cs | 27 + Repository/TemplateRepository.cs | 207 +- Services/ApiClientSecretHasher.cs | 58 + Services/ApiTokenCreateResult.cs | 13 + Services/ApiTokenService.cs | 162 + Services/QueueJobService.cs | 43 +- appsettings.json | 17 + 72 files changed, 32906 insertions(+), 516 deletions(-) create mode 100644 .tests/Api.Tests.ps1 delete mode 100644 .tests/BgwMerge.Api.Tests.ps1 delete mode 100644 .tests/Compare-BgwMergeWithApi.ps1 create mode 100644 .tests/OnPremClientCredentials.Api.Tests.ps1 create mode 100644 Controllers/ApiTokenController.cs create mode 100644 Controllers/AuthController.cs create mode 100644 Controllers/ConfigurationDefinitionController.cs create mode 100644 Controllers/ConfigurationValueController.cs create mode 100644 Controllers/CredentialSecretController.cs create mode 100644 Controllers/DeploymentArtifactController.cs create mode 100644 Dto/Auth/CreateManagedTokenRequestDto.cs create mode 100644 Dto/Auth/CreateManagedTokenResponseDto.cs create mode 100644 Dto/Auth/GetManagedTokenDto.cs create mode 100644 Dto/Auth/TokenRequestDto.cs create mode 100644 Dto/Auth/TokenResponseDto.cs create mode 100644 Dto/ConfigurationDefinition/Add/AddConfigurationDefinitionDto.cs create mode 100644 Dto/ConfigurationDefinition/Edit/EditConfigurationDefinitionDto.cs create mode 100644 Dto/ConfigurationDefinition/Get/GetConfigurationDefinitionDto.cs create mode 100644 Dto/ConfigurationValue/Add/AddConfigurationValueDto.cs create mode 100644 Dto/ConfigurationValue/Get/GetConfigurationValueDto.cs create mode 100644 Dto/CredentialSecret/Add/AddCredentialSecretDto.cs create mode 100644 Dto/CredentialSecret/Get/GetCredentialSecretDto.cs create mode 100644 Dto/CredentialSecret/Get/GetCredentialSecretValueDto.cs create mode 100644 Dto/DeploymentArtifact/Add/AddDeploymentArtifactDto.cs create mode 100644 Dto/DeploymentArtifact/Get/GetDeploymentArtifactDto.cs create mode 100644 Dto/TemplateRevision/Add/AddTemplateRevisionDto.cs create mode 100644 Dto/TemplateRevision/Get/GetTemplateRevisionDto.cs create mode 100644 Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.Designer.cs create mode 100644 Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.cs create mode 100644 Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.Designer.cs create mode 100644 Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.cs create mode 100644 Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.Designer.cs create mode 100644 Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.cs create mode 100644 Migrations/20260709102045_AddOnPremApiClients.Designer.cs create mode 100644 Migrations/20260709102045_AddOnPremApiClients.cs create mode 100644 Migrations/20260709110427_AddApiTokenManagement.Designer.cs create mode 100644 Migrations/20260709110427_AddApiTokenManagement.cs create mode 100644 Migrations/20260709110540_AddDemoApiClientTokenScopes.Designer.cs create mode 100644 Migrations/20260709110540_AddDemoApiClientTokenScopes.cs create mode 100644 Models/ApiClientModel.cs create mode 100644 Models/ApiTokenModel.cs create mode 100644 Models/ConfigurationDefinitionModel.cs create mode 100644 Models/ConfigurationValueModel.cs create mode 100644 Models/CredentialSecretModel.cs create mode 100644 Models/DeploymentArtifactModel.cs create mode 100644 Models/TemplateRevisionModel.cs create mode 100644 Services/ApiClientSecretHasher.cs create mode 100644 Services/ApiTokenCreateResult.cs create mode 100644 Services/ApiTokenService.cs diff --git a/.gitignore b/.gitignore index 46344a7..1344d20 100644 --- a/.gitignore +++ b/.gitignore @@ -4,17 +4,22 @@ obj/ out/ publish/ artifacts/ +buildcheck/ +*.nupkg +*.snupkg # Visual Studio / Rider / VS Code .vs/ .idea/ .vscode/.ropeproject +.vscode/.ionide/ *.user *.suo *.rsuser *.sln.docstates *.csproj.user *.csproj.lscache +*.sln.DotSettings.user # .NET / test artifacts TestResults/ @@ -32,6 +37,8 @@ coverage.cobertura.xml *.cache *.bak *.orig +*.pid +*.pid.lock # Local configuration / secrets appsettings.Local.json @@ -39,9 +46,12 @@ appsettings.*.local.json appsettings.*.Local.json *.secrets.json secrets.json +*.kdbx +*.key # EF / local tooling noise .ef/ +efbundle.exe # OS files .DS_Store @@ -57,4 +67,10 @@ dist/ npm-debug.log* yarn-debug.log* yarn-error.log* -pnpm-debug.log* \ No newline at end of file +pnpm-debug.log* + +# Keep source artifacts versioned: +# - Context/DemoData*.cs +# - Migrations/*.cs +# - .tests/*.ps1 +# - Docs/**/*.md diff --git a/.tests/Api.Tests.ps1 b/.tests/Api.Tests.ps1 new file mode 100644 index 0000000..81f5916 --- /dev/null +++ b/.tests/Api.Tests.ps1 @@ -0,0 +1,310 @@ +param( + [string]$ApiBaseUrl = 'http://localhost:5286/api', + + [string]$DeploymentBatchId = '80000000-0000-0000-0000-000000000101', + + [int]$ApiTimeoutSec = 30, + + [bool]$UseDefaultCredentials = $true, + + [System.Management.Automation.PSCredential]$Credential +) + +$ErrorActionPreference = 'Stop' + +function Invoke-TestMergeApiJson { + param( + [ValidateSet('GET', 'POST', 'PUT', 'DELETE')] + [string]$Method, + + [string]$Path + ) + + $uri = ('{0}/{1}' -f $ApiBaseUrl.TrimEnd('/'), $Path.TrimStart('/')) + $parameters = @{ + Method = $Method + Uri = $uri + TimeoutSec = $ApiTimeoutSec + ErrorAction = 'Stop' + } + + if ($Credential) { + $parameters.Credential = $Credential + } + elseif ($UseDefaultCredentials) { + $parameters.UseDefaultCredentials = $true + } + + try { + Invoke-RestMethod @parameters + } + catch { + $responseBody = '' + if ($_.Exception.Response) { + try { + $stream = $_.Exception.Response.GetResponseStream() + if ($stream) { + $reader = [System.IO.StreamReader]::new($stream) + $text = $reader.ReadToEnd() + if (-not [string]::IsNullOrWhiteSpace($text)) { + $responseBody = $text + } + } + } + catch { + $responseBody = '' + } + } + + throw "API request failed. Method=[$Method], Uri=[$uri], Response=[$responseBody]. $($_.Exception.Message)" + } +} + +function ConvertFrom-TestJson { + param([string]$Json) + + $Json | ConvertFrom-Json +} + +function Get-TestDefinition { + param( + [object[]]$Definitions, + [string]$RevisionId, + [string]$Kind, + [string]$Name + ) + + @($Definitions | Where-Object { + [string]$_.templateRevisionId -eq $RevisionId -and + $_.kind -eq $Kind -and + $_.name -eq $Name + })[0] +} + +function Get-TestFirst { + param([object[]]$Items) + + @($Items | Select-Object -First 1)[0] +} + +function Get-TestSelectionByRole { + param( + [object]$Composition, + [string]$Role + ) + + Get-TestFirst -Items @($Composition.templateSelections | Where-Object { $_.templateRole -eq $Role }) +} + +function Get-TestRevisionDefinitions { + param([object]$Selection) + + $templateId = [string]$Selection.templateVersion.templateId + $versionId = [string]$Selection.templateVersionId + $revisionId = [string]$Selection.templateRevisionId + + @(Invoke-TestMergeApiJson -Method GET -Path "Template/$templateId/Versions/$versionId/Revisions/$revisionId/Definitions") +} + +function Assert-TestApiIsReachable { + try { + Invoke-TestMergeApiJson -Method GET -Path "deployment-batches/$DeploymentBatchId/composition" | Out-Null + } + catch { + if ($_.Exception.Message -match '401|Nicht autorisiert|Unauthorized') { + throw @" +API authentication failed for [$ApiBaseUrl]. +Start the API with Windows authentication enabled and run the test from a session that can authenticate to it. +You can also pass explicit credentials: +Invoke-Pester -Script @{ Path = '.Net\Microsoft.SelfService.Portal.Core.API\.tests\Api.Tests.ps1'; Parameters = @{ Credential = (Get-Credential) } } + +$($_.Exception.Message) +"@ + } + + throw + } +} + +Describe ' API DemoData composition' { + BeforeAll { + Assert-TestApiIsReachable + + $script:expectedTemplateAliases = @( + 'Environment-Test' + 'Domain-Contoso' + 'Service-SharePoint-Contoso' + 'Stage-Install' + ) + + $script:expectedTemplateRoles = @( + 'Environment' + 'Domain' + 'Service' + 'Stage' + ) + + $script:expectedTemplateRevisionIds = @( + '72000000-0000-0000-0000-000000000101' + '72000000-0000-0000-0000-000000000102' + '72000000-0000-0000-0000-000000000103' + '72000000-0000-0000-0000-000000000104' + ) + + $script:apiComposition = Invoke-TestMergeApiJson -Method GET -Path "deployment-batches/$DeploymentBatchId/composition" + $script:environmentSelection = Get-TestSelectionByRole -Composition $script:apiComposition -Role 'Environment' + $script:domainSelection = Get-TestSelectionByRole -Composition $script:apiComposition -Role 'Domain' + $script:sharePointSelection = Get-TestSelectionByRole -Composition $script:apiComposition -Role 'Service' + $script:stageSelection = Get-TestSelectionByRole -Composition $script:apiComposition -Role 'Stage' + $script:environmentRevisionId = [string]$script:environmentSelection.templateRevisionId + $script:domainRevisionId = [string]$script:domainSelection.templateRevisionId + $script:sharePointRevisionId = [string]$script:sharePointSelection.templateRevisionId + $script:environmentDefinitions = Get-TestRevisionDefinitions -Selection $script:environmentSelection + $script:domainDefinitions = Get-TestRevisionDefinitions -Selection $script:domainSelection + $script:sharePointDefinitions = Get-TestRevisionDefinitions -Selection $script:sharePointSelection + $script:stageDefinitions = Get-TestRevisionDefinitions -Selection $script:stageSelection + $script:deploymentArtifacts = @(Invoke-TestMergeApiJson -Method GET -Path "deployment-artifacts?deploymentGroupId=$DeploymentBatchId") + $script:credentialSecrets = @(Invoke-TestMergeApiJson -Method GET -Path 'credential-secrets') + $script:configurationDefinitions = @(Invoke-TestMergeApiJson -Method GET -Path 'configuration-definitions') + $script:parameterDefinitions = @(Invoke-TestMergeApiJson -Method GET -Path 'configuration-definitions?kind=Parameter') + $script:variableDefinitions = @(Invoke-TestMergeApiJson -Method GET -Path 'configuration-definitions?kind=Variable') + $script:configurationValues = @(Invoke-TestMergeApiJson -Method GET -Path 'configuration-values') + } + + It 'loads the seeded deployment composition from the API' { + $script:apiComposition.deploymentBatchId | Should Be $DeploymentBatchId + @($script:apiComposition.templateSelections).Count | Should Be 4 + @($script:apiComposition.targetAssignments).Count | Should Be 3 + } + + It 'keeps the template selection order from the seeded deployment' { + $aliases = @($script:apiComposition.templateSelections | Sort-Object sortOrder | ForEach-Object { $_.alias }) + $roles = @($script:apiComposition.templateSelections | Sort-Object sortOrder | ForEach-Object { $_.templateRole }) + + ($aliases -join '|') | Should Be ($script:expectedTemplateAliases -join '|') + ($roles -join '|') | Should Be ($script:expectedTemplateRoles -join '|') + } + + It 'pins every template selection to an immutable template revision' { + $revisionIds = @($script:apiComposition.templateSelections | Sort-Object sortOrder | ForEach-Object { [string]$_.templateRevisionId }) + + ($revisionIds -join '|') | Should Be ($script:expectedTemplateRevisionIds -join '|') + @($revisionIds | Where-Object { [string]::IsNullOrWhiteSpace($_) }).Count | Should Be 0 + } + + It 'loads each pinned template revision and its definitions from the API' { + foreach ($selection in @($script:apiComposition.templateSelections | Sort-Object sortOrder)) { + $templateId = [string]$selection.templateVersion.templateId + $versionId = [string]$selection.templateVersionId + $revisionId = [string]$selection.templateRevisionId + + $revision = Invoke-TestMergeApiJson -Method GET -Path "Template/$templateId/Versions/$versionId/Revisions/$revisionId" + $definitions = @(Invoke-TestMergeApiJson -Method GET -Path "Template/$templateId/Versions/$versionId/Revisions/$revisionId/Definitions") + + $revision.id | Should Be $revisionId + $revision.templateVersionId | Should Be $versionId + $revision.revisionNumber | Should Be 1 + $revision.isCurrent | Should Be $true + $revision.isPublished | Should Be $true + + if ($selection.templateRole -ne 'Stage') { + @($definitions).Count | Should BeGreaterThan 0 + } + } + } + + It 'exposes deployment artifact and credential store API surfaces' { + @($script:deploymentArtifacts).Count | Should Be 1 + $script:deploymentArtifacts[0].deploymentGroupId | Should Be $DeploymentBatchId + $script:deploymentArtifacts[0].artifactType | Should Be 'ResolvedConfigurationData' + $script:deploymentArtifacts[0].isStale | Should Be $false + + $secretNames = @($script:credentialSecrets | ForEach-Object { $_.name } | Sort-Object) + $secretNames -contains 'Windows/SharePoint/SetupAccount' | Should Be $true + $secretNames -contains 'Windows/SharePoint/FarmAccount' | Should Be $true + $secretNames -contains 'Windows/SharePoint/FarmPassphrase' | Should Be $true + $secretNames -contains 'Windows/SharePoint/DefaultServiceAccount' | Should Be $true + $secretNames -contains 'Windows/SharePoint/SearchAccount' | Should Be $true + } + + It 'returns resolved deployment artifact values without reading local PSD1 files' { + $deploymentJson = ConvertFrom-TestJson -Json $script:deploymentArtifacts[0].deploymentJson + + $deploymentJson.variables.DatabasePrefix | Should Be 'SharePoint_Contoso_Test' + $deploymentJson.variables.ServiceDbPrefix | Should Be 'SharePoint_Contoso_Test_Services' + $deploymentJson.variables.ConfigDbName | Should Be 'SharePoint_Contoso_Test_Farm_Config' + $deploymentJson.resources.NonNodeData.LocalConfigurationManager.ConfigurationMode | Should Be 'ApplyOnly' + @($deploymentJson.resources.AllNodes).Count | Should Be 3 + $deploymentJson.resources.AllNodes[0].NodeName | Should Be 'CLD-SHP-01' + $deploymentJson.resources.AllNodes[0].RunCentralAdministration | Should Be $true + } + + It 'seeds parameter and variable definitions in the Configuration Definition API' { + @($script:configurationDefinitions).Count | Should BeGreaterThan 0 + @($script:parameterDefinitions).Count | Should BeGreaterThan 0 + @($script:variableDefinitions).Count | Should BeGreaterThan 0 + + $landscape = Get-TestDefinition -Definitions $script:environmentDefinitions -RevisionId $script:environmentRevisionId -Kind 'Parameter' -Name 'Landscape' + $domainFqdn = Get-TestDefinition -Definitions $script:domainDefinitions -RevisionId $script:domainRevisionId -Kind 'Parameter' -Name 'DomainFQDN' + $databasePrefix = Get-TestDefinition -Definitions $script:sharePointDefinitions -RevisionId $script:sharePointRevisionId -Kind 'Parameter' -Name 'DatabasePrefix' + $configDbName = Get-TestDefinition -Definitions $script:environmentDefinitions -RevisionId $script:environmentRevisionId -Kind 'Variable' -Name 'ConfigDbName' + + $landscape.id | Should Not BeNullOrEmpty + $domainFqdn.id | Should Not BeNullOrEmpty + $databasePrefix.id | Should Not BeNullOrEmpty + $configDbName.id | Should Not BeNullOrEmpty + + (ConvertFrom-TestJson -Json $landscape.propertiesJson).AllowedValues -contains 'Test' | Should Be $true + (ConvertFrom-TestJson -Json $databasePrefix.propertiesJson).DefaultValue | Should Be 'SharePoint' + (ConvertFrom-TestJson -Json $configDbName.propertiesJson).Expression | Should Match 'joinNotEmpty' + } + + It 'exposes configuration definitions through the standalone API and keeps revision definitions typed' { + $environmentDefinitions = @(Invoke-TestMergeApiJson -Method GET -Path "configuration-definitions?templateRevisionId=$($script:environmentRevisionId)") + $environmentVariables = @($script:environmentDefinitions | Where-Object { $_.kind -eq 'Variable' }) + + @($environmentDefinitions).Count | Should BeGreaterThan 0 + @($environmentVariables).Count | Should BeGreaterThan 0 + @($environmentVariables | Where-Object { $_.kind -ne 'Variable' }).Count | Should Be 0 + + $environmentDefinitionNames = @($script:environmentDefinitions | ForEach-Object { $_.name }) + $environmentVariableNames = @($environmentVariables | ForEach-Object { $_.name }) + $environmentDefinitionNames -contains 'Landscape' | Should Be $true + $environmentVariableNames -contains 'ConfigDbName' | Should Be $true + } + + It 'seeds configuration values for parameters and variables' { + @($script:configurationValues).Count | Should BeGreaterThan 0 + + $landscape = Get-TestDefinition -Definitions $script:environmentDefinitions -RevisionId $script:environmentRevisionId -Kind 'Parameter' -Name 'Landscape' + $domainFqdn = Get-TestDefinition -Definitions $script:domainDefinitions -RevisionId $script:domainRevisionId -Kind 'Parameter' -Name 'DomainFQDN' + $configDbName = Get-TestDefinition -Definitions $script:environmentDefinitions -RevisionId $script:environmentRevisionId -Kind 'Variable' -Name 'ConfigDbName' + + $landscapeValues = @(Invoke-TestMergeApiJson -Method GET -Path "configuration-definitions/$($landscape.id)/values") + $domainFqdnValues = @(Invoke-TestMergeApiJson -Method GET -Path "configuration-values?definitionId=$($domainFqdn.id)") + $configDbNameValues = @(Invoke-TestMergeApiJson -Method GET -Path "configuration-values?definitionId=$($configDbName.id)") + + @($landscapeValues).Count | Should Be 1 + @($domainFqdnValues).Count | Should Be 1 + @($configDbNameValues).Count | Should Be 1 + + (ConvertFrom-TestJson -Json $landscapeValues[0].valueJson).value | Should Be 'Test' + (ConvertFrom-TestJson -Json $domainFqdnValues[0].valueJson).value | Should Be 'contoso.local' + (ConvertFrom-TestJson -Json $configDbNameValues[0].valueJson).expression | Should Match 'joinNotEmpty' + + $landscapeValues[0].scopeType | Should Be 'TemplateRevision' + [string]$landscapeValues[0].scopeId | Should Be $script:environmentRevisionId + $configDbNameValues[0].valueSourceType | Should Be 'Expression' + } + + It 'marks sensitive parameter values as secret references' { + $setupCredential = Get-TestDefinition -Definitions $script:sharePointDefinitions -RevisionId $script:sharePointRevisionId -Kind 'Parameter' -Name 'SetupCredential' + $setupCredentialValues = @(Invoke-TestMergeApiJson -Method GET -Path "configuration-values?definitionId=$($setupCredential.id)") + $setupValue = ConvertFrom-TestJson -Json $setupCredentialValues[0].valueJson + + @($setupCredentialValues).Count | Should Be 1 + $setupCredentialValues[0].valueSourceType | Should Be 'SecretReference' + $setupValue.value.Provider | Should Be 'SecretManagement' + $setupValue.value.Name | Should Be 'Windows/SharePoint/SetupAccount' + } +} diff --git a/.tests/BgwMerge.Api.Tests.ps1 b/.tests/BgwMerge.Api.Tests.ps1 deleted file mode 100644 index aa9798a..0000000 --- a/.tests/BgwMerge.Api.Tests.ps1 +++ /dev/null @@ -1,421 +0,0 @@ -param( - [string]$ApiBaseUrl = 'http://localhost:5286/api', - - [string]$BgwRoot = ('F:\Kunden Auftr' + [char]0x00E4 + 'ge\BGW'), - - [string]$DeploymentBatchId = '80000000-0000-0000-0000-000000000101', - - [string]$MergeModulePath = 'F:\Projekte\Coding\PowerShell\Merge-DSCConfigurationData\Merge-DSCConfigurationData.psd1', - - [string]$ResolveModulePath = 'F:\Projekte\Coding\PowerShell\Resolve-DSCConfigurationData\Resolve-DSCConfigurationData.psd1', - - [int]$ApiTimeoutSec = 30, - - [bool]$UseDefaultCredentials = $true -) - -$ErrorActionPreference = 'Stop' - -function Invoke-TestBgwMergeApiJson { - param( - [ValidateSet('GET', 'POST', 'PUT', 'DELETE')] - [string]$Method, - - [string]$Path - ) - - $uri = ('{0}/{1}' -f $ApiBaseUrl.TrimEnd('/'), $Path.TrimStart('/')) - $parameters = @{ - Method = $Method - Uri = $uri - TimeoutSec = $ApiTimeoutSec - ErrorAction = 'Stop' - } - - if ($UseDefaultCredentials) { - $parameters.UseDefaultCredentials = $true - } - - try { - Invoke-RestMethod @parameters - } - catch { - $responseBody = '' - if ($_.Exception.Response) { - try { - $stream = $_.Exception.Response.GetResponseStream() - if ($stream) { - $reader = [System.IO.StreamReader]::new($stream) - $text = $reader.ReadToEnd() - if (-not [string]::IsNullOrWhiteSpace($text)) { - $responseBody = $text - } - } - } - catch { - $responseBody = '' - } - } - - throw "API request failed. Method=[$Method], Uri=[$uri], Response=[$responseBody]. $($_.Exception.Message)" - } -} - -function ConvertTo-TestBgwMergeConfigurationValue { - param([object]$Value) - - if ($null -eq $Value) { - return $null - } - - if ($Value -is [string] -or $Value -is [bool] -or $Value -is [int] -or $Value -is [long] -or $Value -is [double] -or $Value -is [decimal]) { - return $Value - } - - if ($Value -is [System.Collections.IDictionary]) { - $result = [ordered]@{} - foreach ($key in $Value.Keys) { - $result[[string]$key] = ConvertTo-TestBgwMergeConfigurationValue -Value $Value[$key] - } - - Write-Output -NoEnumerate $result - return - } - - if ($Value -is [pscustomobject]) { - $result = [ordered]@{} - foreach ($property in $Value.PSObject.Properties) { - $result[$property.Name] = ConvertTo-TestBgwMergeConfigurationValue -Value $property.Value - } - - Write-Output -NoEnumerate $result - return - } - - if ($Value -is [System.Collections.IEnumerable] -and $Value -isnot [string]) { - $items = New-Object System.Collections.Generic.List[object] - foreach ($item in $Value) { - $items.Add((ConvertTo-TestBgwMergeConfigurationValue -Value $item)) - } - - Write-Output -NoEnumerate $items.ToArray() - return - } - - return $Value -} - -function ConvertFrom-TestBgwMergeTemplateJson { - param([string]$JsonData) - - $document = $JsonData | ConvertFrom-Json - $metadata = ConvertTo-TestBgwMergeConfigurationValue -Value $document.metadata - if ($null -eq $metadata) { - $metadata = [ordered]@{} - } - - if (-not $metadata.Contains('TemplateType')) { - $metadata['TemplateType'] = $document.templateType - } - - [ordered]@{ - Metadata = $metadata - Parameters = ConvertTo-TestBgwMergeConfigurationValue -Value $document.parameters - Variables = ConvertTo-TestBgwMergeConfigurationValue -Value $document.variables - Resources = ConvertTo-TestBgwMergeConfigurationValue -Value $document.resources - } -} - -function ConvertFrom-TestBgwMergeTargetAssignments { - param([object[]]$TargetAssignments) - - @($TargetAssignments | Sort-Object sortOrder | ForEach-Object { - $nodeData = ConvertTo-TestBgwMergeConfigurationValue -Value ($_.nodeDataJson | ConvertFrom-Json) - $node = @{} - - foreach ($key in $nodeData.Keys) { - if ($key -eq 'nodeName') { - $node.NodeName = $nodeData[$key] - } - else { - $node[$key] = $nodeData[$key] - } - } - - $node - }) -} - -function ConvertTo-TestBgwMergeStableValue { - param([object]$Value) - - if ($null -eq $Value) { - return $null - } - - if ($Value -is [string] -or $Value -is [bool] -or $Value -is [int] -or $Value -is [long] -or $Value -is [double] -or $Value -is [decimal]) { - return $Value - } - - if ($Value -is [System.Collections.IDictionary]) { - $result = [ordered]@{} - foreach ($key in @($Value.Keys | Sort-Object)) { - $result[[string]$key] = ConvertTo-TestBgwMergeStableValue -Value $Value[$key] - } - - Write-Output -NoEnumerate $result - return - } - - if ($Value -is [pscustomobject]) { - $result = [ordered]@{} - foreach ($property in @($Value.PSObject.Properties | Sort-Object Name)) { - $result[$property.Name] = ConvertTo-TestBgwMergeStableValue -Value $property.Value - } - - Write-Output -NoEnumerate $result - return - } - - if ($Value -is [System.Collections.IEnumerable] -and $Value -isnot [string]) { - $items = New-Object System.Collections.Generic.List[object] - foreach ($item in $Value) { - $items.Add((ConvertTo-TestBgwMergeStableValue -Value $item)) - } - - Write-Output -NoEnumerate $items.ToArray() - return - } - - return $Value -} - -function ConvertTo-TestBgwMergeStableJson { - param([object]$Value) - - (ConvertTo-TestBgwMergeStableValue -Value $Value) | ConvertTo-Json -Depth 100 -Compress -} - -function Invoke-TestBgwMergeSnapshotScript { - param([string]$Script) - - $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($Script)) - $output = & powershell.exe -NoProfile -ExecutionPolicy Bypass -EncodedCommand $encodedCommand - - if ($LASTEXITCODE -ne 0) { - throw "Snapshot PowerShell process failed with exit code [$LASTEXITCODE]. Output: $($output -join [Environment]::NewLine)" - } - - $json = ($output | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) -join [Environment]::NewLine - if ([string]::IsNullOrWhiteSpace($json)) { - throw 'Snapshot PowerShell process returned no JSON output.' - } - - $json | ConvertFrom-Json -} - -function New-TestBgwMergeSnapshotScript { - param( - [string]$ConfigurationDataPath, - [switch]$BuildLocalBaseline - ) - - $escapedBgwRoot = $BgwRoot.Replace("'", "''") - $escapedMergeModulePath = $MergeModulePath.Replace("'", "''") - $escapedResolveModulePath = $ResolveModulePath.Replace("'", "''") - $escapedConfigurationDataPath = if ($ConfigurationDataPath) { $ConfigurationDataPath.Replace("'", "''") } else { '' } - $buildLocalBaselineText = if ($BuildLocalBaseline) { 'True' } else { 'False' } - -@" -`$ErrorActionPreference = 'Stop' -`$ProgressPreference = 'SilentlyContinue' -Import-Module '$escapedMergeModulePath' -Force -Import-Module '$escapedResolveModulePath' -Force - -function ConvertTo-SnapshotStableValue { - param([object]`$Value) - - if (`$null -eq `$Value) { return `$null } - if (`$Value -is [string] -or `$Value -is [bool] -or `$Value -is [int] -or `$Value -is [long] -or `$Value -is [double] -or `$Value -is [decimal]) { return `$Value } - - if (`$Value -is [System.Collections.IDictionary]) { - `$result = [ordered]@{} - foreach (`$key in @(`$Value.Keys | Sort-Object)) { - `$result[[string]`$key] = ConvertTo-SnapshotStableValue -Value `$Value[`$key] - } - Write-Output -NoEnumerate `$result - return - } - - if (`$Value -is [pscustomobject]) { - `$result = [ordered]@{} - foreach (`$property in @(`$Value.PSObject.Properties | Sort-Object Name)) { - `$result[`$property.Name] = ConvertTo-SnapshotStableValue -Value `$property.Value - } - Write-Output -NoEnumerate `$result - return - } - - if (`$Value -is [System.Collections.IEnumerable] -and `$Value -isnot [string]) { - `$items = New-Object System.Collections.Generic.List[object] - foreach (`$item in `$Value) { - `$items.Add((ConvertTo-SnapshotStableValue -Value `$item)) - } - Write-Output -NoEnumerate `$items.ToArray() - return - } - - return `$Value -} - -function ConvertTo-SnapshotStableJson { - param([object]`$Value) - (ConvertTo-SnapshotStableValue -Value `$Value) | ConvertTo-Json -Depth 100 -Compress -} - -if ('$buildLocalBaselineText' -eq 'True') { - `$root = '$escapedBgwRoot' - `$sourceTemplates = @( - (Join-Path -Path `$root -ChildPath 'Environment\Test.psd1') - (Join-Path -Path `$root -ChildPath 'Domain\Contoso.psd1') - (Join-Path -Path `$root -ChildPath 'Service\SharePoint\Contoso.psd1') - (Join-Path -Path `$root -ChildPath 'Stage\Install.psd1') - ) - - `$allNodes = @( - @{ NodeName = 'CLD-SHP-01'; RunCentralAdministration = `$true } - @{ NodeName = 'CLD-SHP-02'; RunCentralAdministration = `$false } - @{ NodeName = 'CLD-SHP-03'; RunCentralAdministration = `$false } - ) - - `$configurationData = New-DSCConfigurationDataDeployment -Name 'Contoso-Test-SharePoint' -DeploymentId '8f6c2c1a' -SourceTemplatePath `$sourceTemplates -AllNodes `$allNodes -} -else { - `$configurationData = Import-PowerShellDataFile -LiteralPath '$escapedConfigurationDataPath' -} - -`$resolved = Resolve-DSCConfigurationData -ConfigurationData `$configurationData -SkipSecrets -`$snapshot = [ordered]@{ - ParametersJson = ConvertTo-SnapshotStableJson -Value `$configurationData.Parameters - VariablesJson = ConvertTo-SnapshotStableJson -Value `$configurationData.Variables - ResourcesJson = ConvertTo-SnapshotStableJson -Value `$configurationData.Resources - DatabasePrefix = `$resolved.Variables.DatabasePrefix - ServiceDbPrefix = `$resolved.Variables.ServiceDbPrefix - ConfigDbName = `$resolved.Variables.ConfigDbName - LcmConfigurationMode = `$resolved.Resources.NonNodeData.LocalConfigurationManager.ConfigurationMode - AllNodes = @(`$resolved.Resources.AllNodes | Sort-Object NodeName | ForEach-Object { - [ordered]@{ - NodeName = `$_.NodeName - RunCentralAdministration = `$_.RunCentralAdministration - } - }) -} - -`$snapshot | ConvertTo-Json -Depth 100 -Compress -"@ -} - -function New-TestBgwMergeLocalSnapshot { - Invoke-TestBgwMergeSnapshotScript -Script (New-TestBgwMergeSnapshotScript -BuildLocalBaseline) -} - -function New-TestBgwMergeSnapshotFromConfigurationData { - param([hashtable]$ConfigurationData) - - Import-Module $MergeModulePath -Force - - $tempPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ("BgwMergeApiSnapshot-{0}.psd1" -f ([guid]::NewGuid().ToString('N'))) - try { - Export-PowerShellDataFile -InputObject $ConfigurationData -Path $tempPath -Force - Invoke-TestBgwMergeSnapshotScript -Script (New-TestBgwMergeSnapshotScript -ConfigurationDataPath $tempPath) - } - finally { - if (Test-Path -LiteralPath $tempPath) { - Remove-Item -LiteralPath $tempPath -Force - } - } -} - -function New-TestBgwMergeApiConfigurationData { - param([object]$Composition) - - Import-Module $MergeModulePath -Force - - $mergedTemplateData = @{} - - foreach ($selection in @($Composition.templateSelections | Sort-Object sortOrder)) { - $templateData = ConvertFrom-TestBgwMergeTemplateJson -JsonData $selection.templateVersion.jsonData - $mergedTemplateData = Merge-DSCConfigurationData -Template $mergedTemplateData -Deployment $templateData - } - - $deploymentData = @{ - Resources = @{ - AllNodes = ConvertFrom-TestBgwMergeTargetAssignments -TargetAssignments @($Composition.targetAssignments) - } - } - - Merge-DSCConfigurationData -Template $mergedTemplateData -Deployment $deploymentData -} - -Describe 'BGW Test.Merge.ps1 API DemoData composition' { - BeforeAll { - $script:expectedTemplateAliases = @( - 'Environment-Test' - 'Domain-Contoso' - 'Service-SharePoint-Contoso' - 'Stage-Install' - ) - - $script:expectedTemplateRoles = @( - 'Environment' - 'Domain' - 'Service' - 'Stage' - ) - - $script:localSnapshot = New-TestBgwMergeLocalSnapshot - $script:apiComposition = Invoke-TestBgwMergeApiJson -Method GET -Path "deployment-batches/$DeploymentBatchId/composition" - $script:apiConfigurationData = New-TestBgwMergeApiConfigurationData -Composition $script:apiComposition - $script:apiSnapshot = New-TestBgwMergeSnapshotFromConfigurationData -ConfigurationData $script:apiConfigurationData - } - - It 'loads the seeded deployment composition from the API' { - $script:apiComposition.deploymentBatchId | Should Be $DeploymentBatchId - @($script:apiComposition.templateSelections).Count | Should Be 4 - @($script:apiComposition.targetAssignments).Count | Should Be 3 - } - - It 'keeps the template selection order from Test.Merge.ps1' { - $aliases = @($script:apiComposition.templateSelections | Sort-Object sortOrder | ForEach-Object { $_.alias }) - $roles = @($script:apiComposition.templateSelections | Sort-Object sortOrder | ForEach-Object { $_.templateRole }) - - ($aliases -join '|') | Should Be ($script:expectedTemplateAliases -join '|') - ($roles -join '|') | Should Be ($script:expectedTemplateRoles -join '|') - } - - It 'keeps the AllNodes data from Test.Merge.ps1' { - $nodes = @($script:apiSnapshot.AllNodes | Sort-Object NodeName) - - $nodes.Count | Should Be 3 - $nodes[0].NodeName | Should Be 'CLD-SHP-01' - $nodes[0].RunCentralAdministration | Should Be $true - $nodes[1].NodeName | Should Be 'CLD-SHP-02' - $nodes[1].RunCentralAdministration | Should Be $false - $nodes[2].NodeName | Should Be 'CLD-SHP-03' - $nodes[2].RunCentralAdministration | Should Be $false - } - - It 'resolves the same core values as the local Test.Merge.ps1 baseline' { - $script:apiSnapshot.DatabasePrefix | Should Be $script:localSnapshot.DatabasePrefix - $script:apiSnapshot.ServiceDbPrefix | Should Be $script:localSnapshot.ServiceDbPrefix - $script:apiSnapshot.ConfigDbName | Should Be $script:localSnapshot.ConfigDbName - $script:apiSnapshot.LcmConfigurationMode | Should Be $script:localSnapshot.LcmConfigurationMode - } - - It 'matches merged Parameters, Variables and Resources' { - $script:apiSnapshot.ParametersJson | Should Be $script:localSnapshot.ParametersJson - $script:apiSnapshot.VariablesJson | Should Be $script:localSnapshot.VariablesJson - $script:apiSnapshot.ResourcesJson | Should Be $script:localSnapshot.ResourcesJson - } -} - diff --git a/.tests/Compare-BgwMergeWithApi.ps1 b/.tests/Compare-BgwMergeWithApi.ps1 deleted file mode 100644 index e20643d..0000000 --- a/.tests/Compare-BgwMergeWithApi.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -[CmdletBinding()] -param( - [string]$ApiBaseUrl = 'http://localhost:5286/api', - - [string]$BgwRoot = ('F:\Kunden Auftr' + [char]0x00E4 + 'ge\BGW'), - - [string]$DeploymentBatchId = '80000000-0000-0000-0000-000000000101', - - [string]$MergeModulePath = 'F:\Projekte\Coding\PowerShell\Merge-DSCConfigurationData\Merge-DSCConfigurationData.psd1', - - [string]$ResolveModulePath = 'F:\Projekte\Coding\PowerShell\Resolve-DSCConfigurationData\Resolve-DSCConfigurationData.psd1', - - [int]$ApiTimeoutSec = 30, - - [switch]$UseDefaultCredentials = $true -) - -$ErrorActionPreference = 'Stop' - -$testPath = Join-Path -Path $PSScriptRoot -ChildPath 'BgwMerge.Api.Tests.ps1' -if (-not (Test-Path -LiteralPath $testPath -PathType Leaf)) { - throw "Pester test file [$testPath] was not found." -} - -if (-not (Get-Command Invoke-Pester -ErrorAction SilentlyContinue)) { - throw 'Pester is required. Install-Module Pester or run this on a machine where Pester is available.' -} - -$parameters = @{ - ApiBaseUrl = $ApiBaseUrl - BgwRoot = $BgwRoot - DeploymentBatchId = $DeploymentBatchId - MergeModulePath = $MergeModulePath - ResolveModulePath = $ResolveModulePath - ApiTimeoutSec = $ApiTimeoutSec - UseDefaultCredentials = [bool]$UseDefaultCredentials -} - -$result = Invoke-Pester -Script @{ Path = $testPath; Parameters = $parameters } -PassThru -if ($result.FailedCount -gt 0) { - throw "Pester test run failed. Passed=[$($result.PassedCount)] Failed=[$($result.FailedCount)] Skipped=[$($result.SkippedCount)]." -} diff --git a/.tests/OnPremClientCredentials.Api.Tests.ps1 b/.tests/OnPremClientCredentials.Api.Tests.ps1 new file mode 100644 index 0000000..a2213fe --- /dev/null +++ b/.tests/OnPremClientCredentials.Api.Tests.ps1 @@ -0,0 +1,137 @@ +param( + [string]$ApiBaseUrl = 'http://localhost:5286/api', + + [string]$ClientId = 'ssp-demo-worker', + + [string]$ClientSecret = 'DemoOnly-DoNotUseInProduction!', + + [int]$ApiTimeoutSec = 30 +) + +$ErrorActionPreference = 'Stop' + +function Invoke-TestApi { + param( + [ValidateSet('GET', 'POST', 'DELETE')] + [string]$Method, + + [string]$Path, + + [object]$Body, + + [string]$BearerToken + ) + + $uri = ('{0}/{1}' -f $ApiBaseUrl.TrimEnd('/'), $Path.TrimStart('/')) + $parameters = @{ + Method = $Method + Uri = $uri + TimeoutSec = $ApiTimeoutSec + ErrorAction = 'Stop' + } + + if ($Body) { + $parameters.Body = ($Body | ConvertTo-Json -Depth 10) + $parameters.ContentType = 'application/json' + } + + if ($BearerToken) { + $parameters.Headers = @{ + Authorization = "Bearer $BearerToken" + } + } + + try { + Invoke-RestMethod @parameters + } + catch { + $responseBody = '' + if ($_.Exception.Response) { + try { + $stream = $_.Exception.Response.GetResponseStream() + if ($stream) { + $reader = [System.IO.StreamReader]::new($stream) + $text = $reader.ReadToEnd() + if (-not [string]::IsNullOrWhiteSpace($text)) { + $responseBody = $text + } + } + } + catch { + $responseBody = '' + } + } + + throw "API request failed. Method=[$Method], Uri=[$uri], Response=[$responseBody]. $($_.Exception.Message)" + } +} + +Describe 'On-prem client credentials API authentication' { + It 'issues a bearer token for the seeded demo worker client' { + $token = Invoke-TestApi -Method POST -Path 'auth/token' -Body @{ + clientId = $ClientId + clientSecret = $ClientSecret + scope = 'deployment.read template.read' + } + + $token.accessToken | Should Not BeNullOrEmpty + $token.tokenType | Should Be 'Bearer' + $token.expiresIn | Should BeGreaterThan 0 + $token.scope | Should Be 'deployment.read template.read' + } + + It 'allows bearer-token API calls without Windows authentication' { + $token = Invoke-TestApi -Method POST -Path 'auth/token' -Body @{ + clientId = $ClientId + clientSecret = $ClientSecret + scope = 'deployment.read template.read' + } + + $definitions = @(Invoke-TestApi -Method GET -Path 'configuration-definitions?kind=Parameter' -BearerToken $token.accessToken) + + @($definitions).Count | Should BeGreaterThan 0 + @($definitions | Where-Object { $_.kind -ne 'Parameter' }).Count | Should Be 0 + } + + It 'creates, lists and revokes managed tokens through the token API' { + $adminToken = Invoke-TestApi -Method POST -Path 'auth/token' -Body @{ + clientId = $ClientId + clientSecret = $ClientSecret + scope = 'token.manage token.admin deployment.read' + } + + $managedToken = Invoke-TestApi -Method POST -Path 'tokens/my' -BearerToken $adminToken.accessToken -Body @{ + name = 'Pester managed token' + scope = 'deployment.read' + } + + $managedToken.id | Should Not BeNullOrEmpty + $managedToken.accessToken | Should Not BeNullOrEmpty + $managedToken.scope | Should Be 'deployment.read' + + $myTokens = @(Invoke-TestApi -Method GET -Path 'tokens/my' -BearerToken $adminToken.accessToken) + @($myTokens | Where-Object { $_.id -eq $managedToken.id }).Count | Should Be 1 + + $allTokens = @(Invoke-TestApi -Method GET -Path 'tokens/admin' -BearerToken $adminToken.accessToken) + @($allTokens | Where-Object { $_.id -eq $managedToken.id }).Count | Should Be 1 + + $deletedToken = Invoke-TestApi -Method DELETE -Path ('tokens/my/{0}' -f $managedToken.id) -BearerToken $adminToken.accessToken + + $deletedToken.id | Should Be $managedToken.id + $deletedToken.revokedAt | Should Not BeNullOrEmpty + $deletedToken.isActive | Should Be $false + + $myTokensAfterDelete = @(Invoke-TestApi -Method GET -Path 'tokens/my' -BearerToken $adminToken.accessToken) + $myTokenAfterDelete = $myTokensAfterDelete | Where-Object { [string]$_.id -eq [string]$managedToken.id } | Select-Object -First 1 + if ($myTokenAfterDelete) { + $myTokenAfterDelete.isActive | Should Be $false + } + + $adminTokensAfterDelete = @(Invoke-TestApi -Method GET -Path 'tokens/admin' -BearerToken $adminToken.accessToken) + $revokedToken = $adminTokensAfterDelete | Where-Object { [string]$_.id -eq [string]$managedToken.id } | Select-Object -First 1 + if ($revokedToken) { + $revokedToken.revokedAt | Should Not BeNullOrEmpty + $revokedToken.isActive | Should Be $false + } + } +} diff --git a/Context/DataContext.cs b/Context/DataContext.cs index 3fec8f8..c549c52 100644 --- a/Context/DataContext.cs +++ b/Context/DataContext.cs @@ -19,6 +19,13 @@ namespace Microsoft.SelfService.Portal.Core.API.Context public DbSet DeploymentGroups { get; set; } public DbSet Templates { get; set; } public DbSet TemplateVersions { get; set; } + public DbSet TemplateRevisions { get; set; } + public DbSet ConfigurationDefinitions { get; set; } + public DbSet ConfigurationValues { get; set; } + public DbSet DeploymentArtifacts { get; set; } + public DbSet CredentialSecrets { get; set; } + public DbSet ApiClients { get; set; } + public DbSet ApiTokens { get; set; } public DbSet DeploymentRules { get; set; } public DbSet DeploymentRuleSteps { get; set; } public DbSet DeploymentTemplateSelections { get; set; } @@ -148,6 +155,18 @@ namespace Microsoft.SelfService.Portal.Core.API.Context .WithMany(dg => dg.Deployments) .HasForeignKey(d => d.DeploymentGroupId); + modelBuilder.Entity() + .HasOne(deployment => deployment.TemplateRevision) + .WithMany(revision => revision.Deployments) + .HasForeignKey(deployment => deployment.TemplateRevisionId) + .OnDelete(DeleteBehavior.Restrict); + + modelBuilder.Entity() + .HasOne(deployment => deployment.CurrentArtifact) + .WithMany() + .HasForeignKey(deployment => deployment.CurrentArtifactId) + .OnDelete(DeleteBehavior.NoAction); + modelBuilder.Entity() .HasOne(dg => dg.Template) .WithMany(t => t.DeploymentGroups) @@ -170,6 +189,12 @@ namespace Microsoft.SelfService.Portal.Core.API.Context .HasForeignKey(selection => selection.TemplateVersionId) .OnDelete(DeleteBehavior.Restrict); + modelBuilder.Entity() + .HasOne(selection => selection.TemplateRevision) + .WithMany(revision => revision.DeploymentTemplateSelections) + .HasForeignKey(selection => selection.TemplateRevisionId) + .OnDelete(DeleteBehavior.Restrict); + modelBuilder.Entity() .HasIndex(selection => new { selection.DeploymentGroupId, selection.SortOrder }) .IsUnique(); @@ -250,6 +275,161 @@ namespace Microsoft.SelfService.Portal.Core.API.Context modelBuilder.Entity() .ToTable(table => table.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1")); + modelBuilder.Entity() + .HasOne(revision => revision.TemplateVersion) + .WithMany(version => version.TemplateRevisions) + .HasForeignKey(revision => revision.TemplateVersionId); + + modelBuilder.Entity() + .HasIndex(revision => new { revision.TemplateVersionId, revision.RevisionNumber }) + .IsUnique(); + + modelBuilder.Entity() + .HasIndex(revision => revision.TemplateVersionId) + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + modelBuilder.Entity() + .Property(revision => revision.JsonHash) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(revision => revision.SchemaVersion) + .HasMaxLength(32); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1")); + + modelBuilder.Entity() + .HasOne(definition => definition.TemplateRevision) + .WithMany(revision => revision.ConfigurationDefinitions) + .HasForeignKey(definition => definition.TemplateRevisionId) + .OnDelete(DeleteBehavior.Cascade); + + modelBuilder.Entity() + .HasIndex(definition => new { definition.TemplateRevisionId, definition.Kind, definition.Name }) + .IsUnique() + .HasFilter("[TemplateRevisionId] IS NOT NULL"); + + modelBuilder.Entity() + .Property(definition => definition.Kind) + .HasMaxLength(32); + + modelBuilder.Entity() + .Property(definition => definition.DefinitionHash) + .HasMaxLength(64); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_ConfigurationDefinitions_PropertiesJson_IsJson", "ISJSON([PropertiesJson]) = 1")); + + modelBuilder.Entity() + .HasOne(value => value.ConfigurationDefinition) + .WithMany(definition => definition.Values) + .HasForeignKey(value => value.ConfigurationDefinitionId); + + modelBuilder.Entity() + .HasIndex(value => new { value.ConfigurationDefinitionId, value.ScopeType, value.ScopeId, value.SortOrder }); + + modelBuilder.Entity() + .Property(value => value.ScopeType) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(value => value.ValueSourceType) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(value => value.ValueHash) + .HasMaxLength(64); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_ConfigurationValues_ValueJson_IsJson", "[ValueJson] IS NULL OR ISJSON([ValueJson]) = 1")); + + modelBuilder.Entity() + .HasOne(artifact => artifact.DeploymentGroup) + .WithMany(group => group.Artifacts) + .HasForeignKey(artifact => artifact.DeploymentGroupId) + .OnDelete(DeleteBehavior.Cascade); + + modelBuilder.Entity() + .HasOne(artifact => artifact.Deployment) + .WithMany(deployment => deployment.Artifacts) + .HasForeignKey(artifact => new { artifact.TargetId, artifact.DeploymentGroupId }) + .HasPrincipalKey(deployment => new { deployment.TargetId, deployment.DeploymentGroupId }) + .OnDelete(DeleteBehavior.NoAction); + + modelBuilder.Entity() + .HasOne(artifact => artifact.Target) + .WithMany() + .HasForeignKey(artifact => artifact.TargetId) + .OnDelete(DeleteBehavior.Restrict); + + modelBuilder.Entity() + .Property(artifact => artifact.ArtifactType) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(artifact => artifact.InputHash) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(artifact => artifact.OutputHash) + .HasMaxLength(64); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_DeploymentArtifacts_DeploymentJson_IsJson", "ISJSON([DeploymentJson]) = 1")); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_DeploymentArtifacts_SourceJson_IsJson", "[SourceJson] IS NULL OR ISJSON([SourceJson]) = 1")); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_DeploymentArtifacts_ResolvedJson_IsJson", "[ResolvedJson] IS NULL OR ISJSON([ResolvedJson]) = 1")); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_DeploymentArtifacts_SourceSnapshotJson_IsJson", "[SourceSnapshotJson] IS NULL OR ISJSON([SourceSnapshotJson]) = 1")); + + modelBuilder.Entity() + .HasIndex(secret => secret.Name) + .IsUnique(); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_CredentialSecrets_MetadataJson_IsJson", "[MetadataJson] IS NULL OR ISJSON([MetadataJson]) = 1")); + + modelBuilder.Entity() + .HasIndex(client => client.ClientId) + .IsUnique(); + + modelBuilder.Entity() + .Property(client => client.ClientId) + .HasMaxLength(128); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1")); + + modelBuilder.Entity() + .HasOne(token => token.ApiClient) + .WithMany() + .HasForeignKey(token => token.ApiClientId) + .OnDelete(DeleteBehavior.SetNull); + + modelBuilder.Entity() + .HasIndex(token => token.Jti) + .IsUnique(); + + modelBuilder.Entity() + .HasIndex(token => new { token.SubjectType, token.Subject }); + + modelBuilder.Entity() + .Property(token => token.Jti) + .HasMaxLength(64); + + modelBuilder.Entity() + .Property(token => token.SubjectType) + .HasMaxLength(32); + + modelBuilder.Entity() + .ToTable(table => table.HasCheckConstraint("CK_ApiTokens_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1")); + modelBuilder.Entity() .HasOne(step => step.DeploymentRule) .WithMany(rule => rule.Steps) diff --git a/Context/DemoData.cs b/Context/DemoData.cs index 848579d..55f31d6 100644 --- a/Context/DemoData.cs +++ b/Context/DemoData.cs @@ -1,5 +1,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.SelfService.Portal.Core.API.Models; +using System.Security.Cryptography; +using System.Text; +using System.Text.Json; +using Microsoft.SelfService.Portal.Core.API.Services; namespace Microsoft.SelfService.Portal.Core.API.Context { @@ -61,6 +65,15 @@ namespace Microsoft.SelfService.Portal.Core.API.Context internal static readonly Guid TemplateBgwSharePointContosoVersionId = Guid.Parse("71000000-0000-0000-0000-000000000103"); internal static readonly Guid TemplateBgwStageInstallVersionId = Guid.Parse("71000000-0000-0000-0000-000000000104"); + internal static readonly Guid TemplateActiveDirectoryRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000001"); + internal static readonly Guid TemplateSqlServerRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000002"); + internal static readonly Guid TemplateSharePointRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000003"); + internal static readonly Guid TemplateTeamsRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000004"); + internal static readonly Guid TemplateBgwEnvironmentTestRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000101"); + internal static readonly Guid TemplateBgwDomainContosoRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000102"); + internal static readonly Guid TemplateBgwSharePointContosoRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000103"); + internal static readonly Guid TemplateBgwStageInstallRevisionId = Guid.Parse("72000000-0000-0000-0000-000000000104"); + internal static readonly Guid DeploymentBatchSharePointId = Guid.Parse("80000000-0000-0000-0000-000000000001"); internal static readonly Guid DeploymentBatchBgwMergeId = Guid.Parse("80000000-0000-0000-0000-000000000101"); internal static readonly Guid DeploymentSp01Id = Guid.Parse("81000000-0000-0000-0000-000000000001"); @@ -81,6 +94,15 @@ namespace Microsoft.SelfService.Portal.Core.API.Context internal static readonly Guid DeploymentTargetBgwSp02Id = Guid.Parse("84000000-0000-0000-0000-000000000102"); internal static readonly Guid DeploymentTargetBgwSp03Id = Guid.Parse("84000000-0000-0000-0000-000000000103"); + internal static readonly Guid DeploymentArtifactBgwResolvedId = Guid.Parse("85000000-0000-0000-0000-000000000101"); + + internal static readonly Guid CredentialSharePointSetupId = Guid.Parse("90000000-0000-0000-0000-000000000001"); + internal static readonly Guid CredentialSharePointFarmId = Guid.Parse("90000000-0000-0000-0000-000000000002"); + internal static readonly Guid CredentialSharePointFarmPassphraseId = Guid.Parse("90000000-0000-0000-0000-000000000003"); + internal static readonly Guid CredentialSharePointDefaultServiceId = Guid.Parse("90000000-0000-0000-0000-000000000004"); + internal static readonly Guid CredentialSharePointSearchId = Guid.Parse("90000000-0000-0000-0000-000000000005"); + internal static readonly Guid ApiClientDemoWorkerId = Guid.Parse("91000000-0000-0000-0000-000000000001"); + internal static void Seed(ModelBuilder modelBuilder) { modelBuilder.Entity().HasData(Environments()); @@ -94,11 +116,17 @@ namespace Microsoft.SelfService.Portal.Core.API.Context modelBuilder.Entity().HasData(DeploymentRuleSteps()); modelBuilder.Entity().HasData(Templates()); modelBuilder.Entity().HasData(TemplateVersions()); + modelBuilder.Entity().HasData(TemplateRevisions()); + modelBuilder.Entity().HasData(ConfigurationDefinitions()); + modelBuilder.Entity().HasData(ConfigurationValues()); modelBuilder.Entity().HasData(DeploymentBatches()); modelBuilder.Entity().HasData(Deployments()); modelBuilder.Entity().HasData(DeploymentTemplateSelections()); modelBuilder.Entity().HasData(DeploymentParameterValues()); modelBuilder.Entity().HasData(DeploymentTargetAssignments()); + modelBuilder.Entity().HasData(DeploymentArtifacts()); + modelBuilder.Entity().HasData(CredentialSecrets()); + modelBuilder.Entity().HasData(ApiClients()); } private static object[] Environments() => @@ -197,6 +225,18 @@ namespace Microsoft.SelfService.Portal.Core.API.Context TemplateVersion(TemplateBgwStageInstallVersionId, TemplateBgwStageInstallId, BgwStageInstallTemplateJson) ]; + private static object[] TemplateRevisions() => + [ + TemplateRevision(TemplateActiveDirectoryRevisionId, TemplateActiveDirectoryVersionId, ActiveDirectoryTemplateJson), + TemplateRevision(TemplateSqlServerRevisionId, TemplateSqlServerVersionId, SqlServerTemplateJson), + TemplateRevision(TemplateSharePointRevisionId, TemplateSharePointVersionId, SharePointTemplateJson), + TemplateRevision(TemplateTeamsRevisionId, TemplateTeamsVersionId, TeamsTemplateJson), + TemplateRevision(TemplateBgwEnvironmentTestRevisionId, TemplateBgwEnvironmentTestVersionId, BgwEnvironmentTestTemplateJson), + TemplateRevision(TemplateBgwDomainContosoRevisionId, TemplateBgwDomainContosoVersionId, BgwDomainContosoTemplateJson), + TemplateRevision(TemplateBgwSharePointContosoRevisionId, TemplateBgwSharePointContosoVersionId, BgwSharePointContosoTemplateJson), + TemplateRevision(TemplateBgwStageInstallRevisionId, TemplateBgwStageInstallVersionId, BgwStageInstallTemplateJson) + ]; + private static object[] DeploymentBatches() => [ Base(new DeploymentGroupModel { Id = DeploymentBatchSharePointId, TemplateId = TemplateSharePointId, DeploymentRuleId = RuleStandardId, Status = QueueJobStatus.Pending }), @@ -205,20 +245,20 @@ namespace Microsoft.SelfService.Portal.Core.API.Context private static object[] Deployments() => [ - Base(new DeploymentModel { Id = DeploymentSp01Id, DeploymentGroupId = DeploymentBatchSharePointId, TargetId = VmSp01Id, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"WebFrontEnd\"}" }), - Base(new DeploymentModel { Id = DeploymentSp02Id, DeploymentGroupId = DeploymentBatchSharePointId, TargetId = VmSp02Id, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Application\"}" }), - Base(new DeploymentModel { Id = DeploymentBgwSp01Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp01Id, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }), - Base(new DeploymentModel { Id = DeploymentBgwSp02Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp02Id, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }), - Base(new DeploymentModel { Id = DeploymentBgwSp03Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp03Id, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }) + Base(new DeploymentModel { Id = DeploymentSp01Id, DeploymentGroupId = DeploymentBatchSharePointId, TargetId = VmSp01Id, TemplateRevisionId = TemplateSharePointRevisionId, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"WebFrontEnd\"}" }), + Base(new DeploymentModel { Id = DeploymentSp02Id, DeploymentGroupId = DeploymentBatchSharePointId, TargetId = VmSp02Id, TemplateRevisionId = TemplateSharePointRevisionId, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Application\"}" }), + Base(new DeploymentModel { Id = DeploymentBgwSp01Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp01Id, TemplateRevisionId = TemplateBgwSharePointContosoRevisionId, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }), + Base(new DeploymentModel { Id = DeploymentBgwSp02Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp02Id, TemplateRevisionId = TemplateBgwSharePointContosoRevisionId, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }), + Base(new DeploymentModel { Id = DeploymentBgwSp03Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp03Id, TemplateRevisionId = TemplateBgwSharePointContosoRevisionId, Status = QueueJobStatus.Pending, JSONData = "{\"role\":\"Node\"}" }) ]; private static object[] DeploymentTemplateSelections() => [ - Base(new DeploymentTemplateSelectionModel { Id = DeploymentSharePointTemplateSelectionId, DeploymentGroupId = DeploymentBatchSharePointId, TemplateVersionId = TemplateSharePointVersionId, TemplateRole = "Service", SortOrder = 10, Alias = "SharePoint" }), - Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwEnvironmentSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwEnvironmentTestVersionId, TemplateRole = "Environment", SortOrder = 10, Alias = "Environment-Test" }), - Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwDomainSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwDomainContosoVersionId, TemplateRole = "Domain", SortOrder = 20, Alias = "Domain-Contoso" }), - Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwSharePointSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwSharePointContosoVersionId, TemplateRole = "Service", SortOrder = 30, Alias = "Service-SharePoint-Contoso" }), - Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwStageSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwStageInstallVersionId, TemplateRole = "Stage", SortOrder = 40, Alias = "Stage-Install" }) + Base(new DeploymentTemplateSelectionModel { Id = DeploymentSharePointTemplateSelectionId, DeploymentGroupId = DeploymentBatchSharePointId, TemplateVersionId = TemplateSharePointVersionId, TemplateRevisionId = TemplateSharePointRevisionId, TemplateRole = "Service", SortOrder = 10, Alias = "SharePoint" }), + Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwEnvironmentSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwEnvironmentTestVersionId, TemplateRevisionId = TemplateBgwEnvironmentTestRevisionId, TemplateRole = "Environment", SortOrder = 10, Alias = "Environment-Test" }), + Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwDomainSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwDomainContosoVersionId, TemplateRevisionId = TemplateBgwDomainContosoRevisionId, TemplateRole = "Domain", SortOrder = 20, Alias = "Domain-Contoso" }), + Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwSharePointSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwSharePointContosoVersionId, TemplateRevisionId = TemplateBgwSharePointContosoRevisionId, TemplateRole = "Service", SortOrder = 30, Alias = "Service-SharePoint-Contoso" }), + Base(new DeploymentTemplateSelectionModel { Id = DeploymentBgwStageSelectionId, DeploymentGroupId = DeploymentBatchBgwMergeId, TemplateVersionId = TemplateBgwStageInstallVersionId, TemplateRevisionId = TemplateBgwStageInstallRevisionId, TemplateRole = "Stage", SortOrder = 40, Alias = "Stage-Install" }) ]; private static object[] DeploymentParameterValues() => @@ -236,6 +276,99 @@ namespace Microsoft.SelfService.Portal.Core.API.Context Base(new DeploymentTargetAssignmentModel { Id = DeploymentTargetBgwSp03Id, DeploymentGroupId = DeploymentBatchBgwMergeId, TargetId = TargetBgwSp03Id, RoleKey = "Node", SortOrder = 30, NodeDataJson = "{\"nodeName\":\"CLD-SHP-03\",\"RunCentralAdministration\":false}" }) ]; + private static object[] ConfigurationDefinitions() + { + return TemplateRevisionJsonDocuments() + .SelectMany(template => ExtractConfigurationDefinitions(template.RevisionId, template.JsonData)) + .Select(definition => Base(definition)) + .Cast() + .ToArray(); + } + + private static object[] ConfigurationValues() + { + return TemplateRevisionJsonDocuments() + .SelectMany(template => ExtractConfigurationValues(template.RevisionId, template.JsonData)) + .Select(value => Base(value)) + .Cast() + .ToArray(); + } + + private static object[] DeploymentArtifacts() + { + var deploymentJson = """ + { + "metadata": { + "name": "Contoso-Test-SharePoint", + "deploymentId": "8f6c2c1a", + "source": "DemoData" + }, + "parameters": { + "DatabasePrefix": "SharePoint_Contoso_Test" + }, + "variables": { + "DatabasePrefix": "SharePoint_Contoso_Test", + "ServiceDbPrefix": "SharePoint_Contoso_Test_Services", + "ConfigDbName": "SharePoint_Contoso_Test_Farm_Config" + }, + "resources": { + "AllNodes": [ + { "NodeName": "CLD-SHP-01", "RunCentralAdministration": true }, + { "NodeName": "CLD-SHP-02", "RunCentralAdministration": false }, + { "NodeName": "CLD-SHP-03", "RunCentralAdministration": false } + ], + "NonNodeData": { + "LocalConfigurationManager": { + "ConfigurationMode": "ApplyOnly" + } + } + } + } + """; + + var sourceSnapshotJson = BgwMergeSourceSnapshotJson(); + + return + [ + Base(new DeploymentArtifactModel + { + Id = DeploymentArtifactBgwResolvedId, + DeploymentGroupId = DeploymentBatchBgwMergeId, + ArtifactType = DeploymentArtifactTypes.ResolvedConfigurationData, + Status = QueueJobStatus.Pending, + DeploymentJson = deploymentJson, + SourceJson = "{\"source\":\"DemoData\",\"composition\":\"Test.Merge.ps1\"}", + ResolvedJson = deploymentJson, + SourceSnapshotJson = sourceSnapshotJson, + InputHash = TemplateVersionModel.ComputeSha256(sourceSnapshotJson), + OutputHash = TemplateVersionModel.ComputeSha256(deploymentJson), + IsStale = false + }) + ]; + } + + private static object[] CredentialSecrets() => + [ + CredentialSecret(CredentialSharePointSetupId, "Windows/SharePoint/SetupAccount", "CONTOSO\\svc_sp_setup"), + CredentialSecret(CredentialSharePointFarmId, "Windows/SharePoint/FarmAccount", "CONTOSO\\svc_sp_farm"), + CredentialSecret(CredentialSharePointFarmPassphraseId, "Windows/SharePoint/FarmPassphrase", null, "Secret"), + CredentialSecret(CredentialSharePointDefaultServiceId, "Windows/SharePoint/DefaultServiceAccount", "CONTOSO\\svc_sp_service"), + CredentialSecret(CredentialSharePointSearchId, "Windows/SharePoint/SearchAccount", "CONTOSO\\svc_sp_search") + ]; + + private static object[] ApiClients() => + [ + Base(new ApiClientModel + { + Id = ApiClientDemoWorkerId, + ClientId = "ssp-demo-worker", + Name = "Demo Worker Client", + SecretHash = ApiClientSecretHasher.HashSecretForDemoData("DemoOnly-DoNotUseInProduction!", "ssp-demo-worker"), + ScopesJson = "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\",\"token.manage\",\"token.admin\"]", + IsEnabled = true + }) + ]; + private static TemplateVersionModel TemplateVersion(Guid id, Guid templateId, string jsonData) { return Base(new TemplateVersionModel @@ -252,6 +385,229 @@ namespace Microsoft.SelfService.Portal.Core.API.Context }); } + private static TemplateRevisionModel TemplateRevision(Guid id, Guid templateVersionId, string jsonData) + { + return Base(new TemplateRevisionModel + { + Id = id, + TemplateVersionId = templateVersionId, + RevisionNumber = 1, + JsonData = jsonData, + JsonHash = TemplateVersionModel.ComputeSha256(jsonData), + SchemaVersion = "1.0", + IsCurrent = true, + IsPublished = true, + PublishedAt = Timestamp, + PublishedBy = Owner + }); + } + + private static CredentialSecretModel CredentialSecret(Guid id, string name, string? userName, string secretType = "Credential") + { + return Base(new CredentialSecretModel + { + Id = id, + Name = name, + UserName = userName, + SecretValue = "DemoOnly-DoNotUseInProduction!", + SecretType = secretType, + MetadataJson = "{\"environment\":\"Demo\",\"plaintext\":true}", + IsEnabled = true + }); + } + + private static IEnumerable<(Guid RevisionId, string JsonData)> TemplateRevisionJsonDocuments() + { + yield return (TemplateActiveDirectoryRevisionId, ActiveDirectoryTemplateJson); + yield return (TemplateSqlServerRevisionId, SqlServerTemplateJson); + yield return (TemplateSharePointRevisionId, SharePointTemplateJson); + yield return (TemplateTeamsRevisionId, TeamsTemplateJson); + yield return (TemplateBgwEnvironmentTestRevisionId, BgwEnvironmentTestTemplateJson); + yield return (TemplateBgwDomainContosoRevisionId, BgwDomainContosoTemplateJson); + yield return (TemplateBgwSharePointContosoRevisionId, BgwSharePointContosoTemplateJson); + yield return (TemplateBgwStageInstallRevisionId, BgwStageInstallTemplateJson); + } + + private static IEnumerable ExtractConfigurationDefinitions(Guid revisionId, string jsonData) + { + using var document = JsonDocument.Parse(jsonData); + var root = document.RootElement; + + foreach (var definition in ExtractConfigurationDefinitions(revisionId, root, "parameters", ConfigurationDefinitionKinds.Parameter)) + yield return definition; + + foreach (var definition in ExtractConfigurationDefinitions(revisionId, root, "variables", ConfigurationDefinitionKinds.Variable)) + yield return definition; + } + + private static IEnumerable ExtractConfigurationDefinitions(Guid revisionId, JsonElement root, string propertyName, string kind) + { + if (!root.TryGetProperty(propertyName, out var definitions) || definitions.ValueKind != JsonValueKind.Object) + yield break; + + foreach (var property in definitions.EnumerateObject()) + { + var propertiesJson = kind == ConfigurationDefinitionKinds.Variable + ? $$"""{"Expression":{{property.Value.GetRawText()}}}""" + : property.Value.GetRawText(); + yield return new ConfigurationDefinitionModel + { + Id = ConfigurationDefinitionId(revisionId, kind, property.Name), + TemplateRevisionId = revisionId, + Kind = kind, + Name = property.Name, + PropertiesJson = propertiesJson, + DefinitionHash = TemplateVersionModel.ComputeSha256(propertiesJson) + }; + } + } + + private static IEnumerable ExtractConfigurationValues(Guid revisionId, string jsonData) + { + using var document = JsonDocument.Parse(jsonData); + var root = document.RootElement; + + foreach (var value in ExtractParameterValues(revisionId, root)) + yield return value; + + foreach (var value in ExtractVariableValues(revisionId, root)) + yield return value; + } + + private static IEnumerable ExtractParameterValues(Guid revisionId, JsonElement root) + { + if (!root.TryGetProperty("parameters", out var parameters) || parameters.ValueKind != JsonValueKind.Object) + yield break; + + var sortOrder = 0; + foreach (var parameter in parameters.EnumerateObject()) + { + sortOrder += 10; + + var valueSourceType = ConfigurationValueSourceTypes.Static; + var valueJson = "{}"; + + if (parameter.Value.ValueKind == JsonValueKind.Object && parameter.Value.TryGetProperty("Value", out var explicitValue)) + { + valueJson = $$"""{"value":{{explicitValue.GetRawText()}}}"""; + } + else if (parameter.Value.ValueKind == JsonValueKind.Object && parameter.Value.TryGetProperty("DefaultValue", out var defaultValue)) + { + valueJson = $$"""{"value":{{defaultValue.GetRawText()}}}"""; + } + + if (parameter.Value.ValueKind == JsonValueKind.Object + && parameter.Value.TryGetProperty("Sensitive", out var sensitive) + && sensitive.ValueKind == JsonValueKind.True) + { + valueSourceType = ConfigurationValueSourceTypes.SecretReference; + } + + yield return ConfigurationValue( + revisionId, + ConfigurationDefinitionKinds.Parameter, + parameter.Name, + valueSourceType, + valueJson, + sortOrder); + } + } + + private static IEnumerable ExtractVariableValues(Guid revisionId, JsonElement root) + { + if (!root.TryGetProperty("variables", out var variables) || variables.ValueKind != JsonValueKind.Object) + yield break; + + var sortOrder = 0; + foreach (var variable in variables.EnumerateObject()) + { + sortOrder += 10; + var valueJson = $$"""{"expression":{{variable.Value.GetRawText()}}}"""; + + yield return ConfigurationValue( + revisionId, + ConfigurationDefinitionKinds.Variable, + variable.Name, + ConfigurationValueSourceTypes.Expression, + valueJson, + sortOrder); + } + } + + private static ConfigurationValueModel ConfigurationValue(Guid revisionId, string kind, string name, string valueSourceType, string valueJson, int sortOrder) + { + return new ConfigurationValueModel + { + Id = ConfigurationValueId(revisionId, kind, name), + ConfigurationDefinitionId = ConfigurationDefinitionId(revisionId, kind, name), + ScopeType = ConfigurationValueScopeTypes.TemplateRevision, + ScopeId = revisionId, + ValueSourceType = valueSourceType, + ValueJson = valueJson, + ValueHash = TemplateVersionModel.ComputeSha256(valueJson), + SortOrder = sortOrder + }; + } + + private static Guid ConfigurationDefinitionId(Guid revisionId, string kind, string name) + { + return DeterministicGuid($"ConfigurationDefinition:{revisionId:N}:{kind}:{name}"); + } + + private static Guid ConfigurationValueId(Guid revisionId, string kind, string name) + { + return DeterministicGuid($"ConfigurationValue:{revisionId:N}:{kind}:{name}"); + } + + private static Guid DeterministicGuid(string value) + { + var hash = MD5.HashData(Encoding.UTF8.GetBytes(value)); + return new Guid(hash); + } + + private static string BgwMergeSourceSnapshotJson() + { + return $$""" + { + "templateRevisions": [ + { + "id": "{{TemplateBgwEnvironmentTestRevisionId}}", + "templateVersionId": "{{TemplateBgwEnvironmentTestVersionId}}", + "role": "Environment", + "alias": "Environment-Test", + "hash": "{{TemplateVersionModel.ComputeSha256(BgwEnvironmentTestTemplateJson)}}" + }, + { + "id": "{{TemplateBgwDomainContosoRevisionId}}", + "templateVersionId": "{{TemplateBgwDomainContosoVersionId}}", + "role": "Domain", + "alias": "Domain-Contoso", + "hash": "{{TemplateVersionModel.ComputeSha256(BgwDomainContosoTemplateJson)}}" + }, + { + "id": "{{TemplateBgwSharePointContosoRevisionId}}", + "templateVersionId": "{{TemplateBgwSharePointContosoVersionId}}", + "role": "Service", + "alias": "Service-SharePoint-Contoso", + "hash": "{{TemplateVersionModel.ComputeSha256(BgwSharePointContosoTemplateJson)}}" + }, + { + "id": "{{TemplateBgwStageInstallRevisionId}}", + "templateVersionId": "{{TemplateBgwStageInstallVersionId}}", + "role": "Stage", + "alias": "Stage-Install", + "hash": "{{TemplateVersionModel.ComputeSha256(BgwStageInstallTemplateJson)}}" + } + ], + "targets": [ + { "id": "{{TargetBgwSp01Id}}", "nodeName": "CLD-SHP-01" }, + { "id": "{{TargetBgwSp02Id}}", "nodeName": "CLD-SHP-02" }, + { "id": "{{TargetBgwSp03Id}}", "nodeName": "CLD-SHP-03" } + ] + } + """; + } + private static T Base(T model) where T : BaseModel { diff --git a/Controllers/ApiTokenController.cs b/Controllers/ApiTokenController.cs new file mode 100644 index 0000000..4b1b325 --- /dev/null +++ b/Controllers/ApiTokenController.cs @@ -0,0 +1,221 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.Auth; +using Microsoft.SelfService.Portal.Core.API.Models; +using Microsoft.SelfService.Portal.Core.API.Services; +using System.Security.Claims; +using System.Text.Json; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/tokens")] + [ApiController] + public class ApiTokenController : Controller + { + private readonly DataContext _context; + private readonly ApiTokenService _tokenService; + + public ApiTokenController(DataContext context, ApiTokenService tokenService) + { + _context = context; + _tokenService = tokenService; + } + + [HttpGet("my")] + [Authorize(Policy = "TokenManage")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetMyTokens() + { + var subject = GetCurrentSubject(); + var subjectType = GetCurrentSubjectType(); + + var tokens = _context.ApiTokens + .Include(token => token.ApiClient) + .Where(token => token.Subject == subject && token.SubjectType == subjectType) + .OrderByDescending(token => token.IssuedAt) + .ToList(); + + return Ok(tokens.Select(ToDto)); + } + + [HttpPost("my")] + [Authorize(Policy = "TokenManage")] + [ProducesResponseType(200, Type = typeof(CreateManagedTokenResponseDto))] + [ProducesResponseType(400)] + public IActionResult CreateMyToken([FromBody] CreateManagedTokenRequestDto request) + { + if (request == null || string.IsNullOrWhiteSpace(request.Scope)) + { + return BadRequest(new { message = "Scope is required." }); + } + + IReadOnlyCollection scopes; + try + { + scopes = _tokenService.ResolveRequestedUserScopes(request.Scope); + } + catch (InvalidOperationException ex) + { + return BadRequest(new { message = ex.Message }); + } + + var subject = GetCurrentSubject(); + var subjectType = GetCurrentSubjectType(); + var name = string.IsNullOrWhiteSpace(request.Name) + ? $"Token for {subject}" + : request.Name.Trim(); + + var token = _tokenService.CreateAccessToken( + subject, + subjectType == "ApiClient" ? subject : null, + scopes); + var now = DateTime.UtcNow; + var expiresAt = request.ExpiresAt.HasValue && request.ExpiresAt.Value < token.ExpiresAt + ? request.ExpiresAt.Value + : token.ExpiresAt; + + if (expiresAt <= now) + { + return BadRequest(new { message = "ExpiresAt must be in the future." }); + } + + var model = new ApiTokenModel + { + Id = Guid.NewGuid(), + Jti = token.Jti, + Subject = subject, + SubjectType = subjectType, + Name = name, + ScopesJson = JsonSerializer.Serialize(scopes), + IssuedAt = token.IssuedAt, + ExpiresAt = expiresAt, + Created = now, + CreatedBy = subject, + Modified = now, + ModifiedBy = subject + }; + + _context.ApiTokens.Add(model); + _context.SaveChanges(); + + return Ok(new CreateManagedTokenResponseDto + { + Id = model.Id, + AccessToken = token.AccessToken, + ExpiresIn = Math.Max(0, Convert.ToInt32((expiresAt - now).TotalSeconds)), + ExpiresAt = expiresAt, + Scope = string.Join(' ', scopes) + }); + } + + [HttpDelete("my/{id}")] + [Authorize(Policy = "TokenManage")] + [ProducesResponseType(200, Type = typeof(GetManagedTokenDto))] + [ProducesResponseType(404)] + public IActionResult RevokeMyToken(Guid id) + { + var subject = GetCurrentSubject(); + var subjectType = GetCurrentSubjectType(); + var token = _context.ApiTokens.FirstOrDefault(existing => + existing.Id == id + && existing.Subject == subject + && existing.SubjectType == subjectType); + + if (token == null) + { + return NotFound(); + } + + RevokeToken(token, subject); + _context.SaveChanges(); + + return Ok(ToDto(token)); + } + + [HttpGet("admin")] + [Authorize(Policy = "TokenAdmin")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetAllTokens() + { + var tokens = _context.ApiTokens + .Include(token => token.ApiClient) + .OrderByDescending(token => token.IssuedAt) + .ToList(); + + return Ok(tokens.Select(ToDto)); + } + + [HttpDelete("admin/{id}")] + [Authorize(Policy = "TokenAdmin")] + [ProducesResponseType(200, Type = typeof(GetManagedTokenDto))] + [ProducesResponseType(404)] + public IActionResult RevokeTokenAsAdmin(Guid id) + { + var token = _context.ApiTokens.FirstOrDefault(existing => existing.Id == id); + if (token == null) + { + return NotFound(); + } + + RevokeToken(token, GetCurrentSubject()); + _context.SaveChanges(); + + return Ok(ToDto(token)); + } + + [HttpGet("scopes")] + [Authorize(Policy = "TokenManage")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetAllowedScopes() + { + return Ok(_tokenService.ReadAllowedTokenScopes()); + } + + private string GetCurrentSubject() + { + return User.FindFirstValue("client_id") + ?? User.FindFirstValue(ClaimTypes.Name) + ?? User.Identity?.Name + ?? "Unknown"; + } + + private string GetCurrentSubjectType() + { + return User.HasClaim(claim => claim.Type == "client_id") ? "ApiClient" : "User"; + } + + private static void RevokeToken(ApiTokenModel token, string revokedBy) + { + if (!token.RevokedAt.HasValue) + { + token.RevokedAt = DateTime.UtcNow; + token.RevokedBy = revokedBy; + token.Modified = DateTime.UtcNow; + token.ModifiedBy = revokedBy; + } + } + + private static GetManagedTokenDto ToDto(ApiTokenModel token) + { + var scopes = JsonSerializer.Deserialize(token.ScopesJson) ?? Array.Empty(); + + return new GetManagedTokenDto + { + Id = token.Id, + Subject = token.Subject, + SubjectType = token.SubjectType, + ClientId = token.ApiClient?.ClientId, + Name = token.Name, + Scope = string.Join(' ', scopes), + IssuedAt = token.IssuedAt, + ExpiresAt = token.ExpiresAt, + RevokedAt = token.RevokedAt, + RevokedBy = token.RevokedBy, + LastUsedAt = token.LastUsedAt, + IsActive = !token.RevokedAt.HasValue && token.ExpiresAt > DateTime.UtcNow + }; + } + } +} diff --git a/Controllers/AuthController.cs b/Controllers/AuthController.cs new file mode 100644 index 0000000..ba59d66 --- /dev/null +++ b/Controllers/AuthController.cs @@ -0,0 +1,94 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.Auth; +using Microsoft.SelfService.Portal.Core.API.Models; +using Microsoft.SelfService.Portal.Core.API.Services; +using System.Text.Json; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/auth")] + [ApiController] + public class AuthController : Controller + { + private readonly DataContext _context; + private readonly ApiTokenService _tokenService; + + public AuthController(DataContext context, ApiTokenService tokenService) + { + _context = context; + _tokenService = tokenService; + } + + [HttpPost("token")] + [AllowAnonymous] + [ProducesResponseType(200, Type = typeof(TokenResponseDto))] + [ProducesResponseType(400)] + [ProducesResponseType(401)] + public IActionResult CreateToken([FromBody] TokenRequestDto request) + { + if (request == null + || string.IsNullOrWhiteSpace(request.ClientId) + || string.IsNullOrWhiteSpace(request.ClientSecret)) + { + return BadRequest(new { message = "ClientId and ClientSecret are required." }); + } + + var client = _context.ApiClients + .FirstOrDefault(existing => existing.ClientId == request.ClientId); + + if (client == null + || !client.IsEnabled + || (client.ExpiresAt.HasValue && client.ExpiresAt.Value <= DateTime.UtcNow) + || !ApiClientSecretHasher.VerifySecret(request.ClientSecret, client.SecretHash)) + { + return Unauthorized(new { message = "Invalid client credentials." }); + } + + IReadOnlyCollection scopes; + try + { + scopes = _tokenService.ResolveRequestedScopes(client, request.Scope); + } + catch (InvalidOperationException ex) + { + return Unauthorized(new { message = ex.Message }); + } + + var token = _tokenService.CreateAccessToken(client, scopes); + var now = DateTime.UtcNow; + + client.LastUsedAt = now; + client.Modified = now; + client.ModifiedBy = client.ClientId; + + _context.ApiTokens.Add(new ApiTokenModel + { + Id = Guid.NewGuid(), + Jti = token.Jti, + Subject = client.ClientId, + SubjectType = "ApiClient", + ApiClientId = client.Id, + Name = $"Client credentials token for {client.Name}", + ScopesJson = JsonSerializer.Serialize(scopes), + IssuedAt = token.IssuedAt, + ExpiresAt = token.ExpiresAt, + Created = now, + CreatedBy = client.ClientId, + Modified = now, + ModifiedBy = client.ClientId + }); + + _context.SaveChanges(); + + return Ok(new TokenResponseDto + { + AccessToken = token.AccessToken, + ExpiresIn = _tokenService.TokenLifetimeSeconds, + Scope = string.Join(' ', scopes) + }); + } + } +} diff --git a/Controllers/ConfigurationDefinitionController.cs b/Controllers/ConfigurationDefinitionController.cs new file mode 100644 index 0000000..48b6b34 --- /dev/null +++ b/Controllers/ConfigurationDefinitionController.cs @@ -0,0 +1,266 @@ +using AutoMapper; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Edit; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Get; +using Microsoft.SelfService.Portal.Core.API.JsonDocuments; +using Microsoft.SelfService.Portal.Core.API.Models; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/configuration-definitions")] + [ApiController] + public class ConfigurationDefinitionController : Controller + { + private readonly DataContext _context; + private readonly IMapper _mapper; + + public ConfigurationDefinitionController(DataContext context, IMapper mapper) + { + _context = context; + _mapper = mapper; + } + + [HttpGet] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetConfigurationDefinitions([FromQuery] Guid? templateRevisionId, [FromQuery] string? kind, [FromQuery] string? name) + { + var query = _context.ConfigurationDefinitions + .AsNoTracking() + .AsQueryable(); + + if (templateRevisionId.HasValue) + query = query.Where(definition => definition.TemplateRevisionId == templateRevisionId.Value); + + if (!string.IsNullOrWhiteSpace(kind)) + query = query.Where(definition => definition.Kind == kind); + + if (!string.IsNullOrWhiteSpace(name)) + query = query.Where(definition => definition.Name == name); + + var definitions = query + .OrderBy(definition => definition.TemplateRevisionId) + .ThenBy(definition => definition.Kind) + .ThenBy(definition => definition.Name) + .ToList(); + + return Ok(_mapper.Map>(definitions)); + } + + [HttpGet("{id}")] + [ProducesResponseType(200, Type = typeof(GetConfigurationDefinitionDto))] + [ProducesResponseType(404)] + public IActionResult GetConfigurationDefinitionById(Guid id) + { + var definition = _context.ConfigurationDefinitions + .AsNoTracking() + .FirstOrDefault(existing => existing.Id == id); + + if (definition == null) + return NotFound(); + + return Ok(_mapper.Map(definition)); + } + + [HttpGet("{id}/values")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + [ProducesResponseType(404)] + public IActionResult GetConfigurationDefinitionValues(Guid id) + { + if (!_context.ConfigurationDefinitions.Any(definition => definition.Id == id)) + return NotFound(); + + var values = _context.ConfigurationValues + .AsNoTracking() + .Where(value => value.ConfigurationDefinitionId == id) + .OrderBy(value => value.ScopeType) + .ThenBy(value => value.SortOrder) + .ToList(); + + return Ok(_mapper.Map>(values)); + } + + [HttpPost] + [ProducesResponseType(200, Type = typeof(Guid))] + [ProducesResponseType(400)] + [ProducesResponseType(422)] + public IActionResult AddConfigurationDefinition([FromBody] AddConfigurationDefinitionDto configurationDefinition) + { + if (configurationDefinition == null) + return BadRequest(ModelState); + + if (!TryPrepareConfigurationDefinition( + configurationDefinition.TemplateRevisionId, + configurationDefinition.Kind, + configurationDefinition.Name, + configurationDefinition.PropertiesJson, + null, + out var propertiesJson, + out var errorField, + out var errorMessage)) + { + ModelState.AddModelError(errorField, errorMessage); + return BadRequest(ModelState); + } + + if (ConfigurationDefinitionExists(configurationDefinition.TemplateRevisionId, configurationDefinition.Kind, configurationDefinition.Name, null)) + { + ModelState.AddModelError(nameof(configurationDefinition.Name), "Configuration definition already exists for this scope, kind and name."); + return StatusCode(422, ModelState); + } + + var model = _mapper.Map(configurationDefinition); + model.Id = Guid.NewGuid(); + model.PropertiesJson = propertiesJson; + model.DefinitionHash = TemplateVersionModel.ComputeSha256(model.PropertiesJson); + model.CreatedBy = User?.Identity?.Name ?? "System"; + model.ModifiedBy = model.CreatedBy; + + _context.ConfigurationDefinitions.Add(model); + _context.SaveChanges(); + + return Ok(model.Id); + } + + [HttpPut("{id}")] + [ProducesResponseType(204)] + [ProducesResponseType(400)] + [ProducesResponseType(404)] + [ProducesResponseType(422)] + public IActionResult UpdateConfigurationDefinition(Guid id, [FromBody] EditConfigurationDefinitionDto configurationDefinition) + { + if (configurationDefinition == null) + return BadRequest(ModelState); + + var existing = _context.ConfigurationDefinitions.FirstOrDefault(definition => definition.Id == id); + if (existing == null) + return NotFound(); + + if (!TryPrepareConfigurationDefinition( + configurationDefinition.TemplateRevisionId, + configurationDefinition.Kind, + configurationDefinition.Name, + configurationDefinition.PropertiesJson, + id, + out var propertiesJson, + out var errorField, + out var errorMessage)) + { + ModelState.AddModelError(errorField, errorMessage); + return BadRequest(ModelState); + } + + if (ConfigurationDefinitionExists(configurationDefinition.TemplateRevisionId, configurationDefinition.Kind, configurationDefinition.Name, id)) + { + ModelState.AddModelError(nameof(configurationDefinition.Name), "Configuration definition already exists for this scope, kind and name."); + return StatusCode(422, ModelState); + } + + existing.TemplateRevisionId = configurationDefinition.TemplateRevisionId; + existing.Kind = configurationDefinition.Kind; + existing.Name = configurationDefinition.Name; + existing.PropertiesJson = propertiesJson; + existing.DefinitionHash = TemplateVersionModel.ComputeSha256(propertiesJson); + existing.Modified = DateTime.UtcNow; + existing.ModifiedBy = User?.Identity?.Name ?? "System"; + + _context.SaveChanges(); + + return NoContent(); + } + + [HttpDelete("{id}")] + [ProducesResponseType(204)] + [ProducesResponseType(404)] + [ProducesResponseType(409)] + public IActionResult DeleteConfigurationDefinition(Guid id) + { + var definition = _context.ConfigurationDefinitions + .Include(existing => existing.Values) + .FirstOrDefault(existing => existing.Id == id); + + if (definition == null) + return NotFound(); + + if (definition.Values.Any()) + { + ModelState.AddModelError(nameof(id), "Configuration definition cannot be deleted while configuration values reference it."); + return StatusCode(409, ModelState); + } + + _context.ConfigurationDefinitions.Remove(definition); + _context.SaveChanges(); + + return NoContent(); + } + + private bool TryPrepareConfigurationDefinition( + Guid? templateRevisionId, + string kind, + string name, + string propertiesJson, + Guid? existingId, + out string normalizedPropertiesJson, + out string errorField, + out string errorMessage) + { + normalizedPropertiesJson = "{}"; + errorField = string.Empty; + errorMessage = string.Empty; + + if (templateRevisionId.HasValue && !_context.TemplateRevisions.Any(revision => revision.Id == templateRevisionId.Value)) + { + errorField = nameof(templateRevisionId); + errorMessage = "Template revision was not found."; + return false; + } + + if (!string.Equals(kind, ConfigurationDefinitionKinds.Parameter, StringComparison.OrdinalIgnoreCase) + && !string.Equals(kind, ConfigurationDefinitionKinds.Variable, StringComparison.OrdinalIgnoreCase)) + { + errorField = nameof(kind); + errorMessage = $"Configuration definition kind must be [{ConfigurationDefinitionKinds.Parameter}] or [{ConfigurationDefinitionKinds.Variable}]."; + return false; + } + + if (string.IsNullOrWhiteSpace(name)) + { + errorField = nameof(name); + errorMessage = "Configuration definition name is required."; + return false; + } + + try + { + normalizedPropertiesJson = ConfigurationDocumentValidator.NormalizeAndValidate( + propertiesJson, + ConfigurationDocumentKind.Metadata).JsonData; + } + catch (ConfigurationDocumentValidationException ex) + { + errorField = nameof(propertiesJson); + errorMessage = ex.Message; + return false; + } + + return true; + } + + private bool ConfigurationDefinitionExists(Guid? templateRevisionId, string kind, string name, Guid? excludeId) + { + var query = _context.ConfigurationDefinitions.AsQueryable(); + + if (excludeId.HasValue) + query = query.Where(definition => definition.Id != excludeId.Value); + + query = templateRevisionId.HasValue + ? query.Where(definition => definition.TemplateRevisionId == templateRevisionId.Value) + : query.Where(definition => definition.TemplateRevisionId == null); + + return query.Any(definition => definition.Kind == kind && definition.Name == name); + } + } +} diff --git a/Controllers/ConfigurationValueController.cs b/Controllers/ConfigurationValueController.cs new file mode 100644 index 0000000..fdea462 --- /dev/null +++ b/Controllers/ConfigurationValueController.cs @@ -0,0 +1,106 @@ +using AutoMapper; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Get; +using Microsoft.SelfService.Portal.Core.API.JsonDocuments; +using Microsoft.SelfService.Portal.Core.API.Models; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/configuration-values")] + [ApiController] + public class ConfigurationValueController : Controller + { + private readonly DataContext _context; + private readonly IMapper _mapper; + + public ConfigurationValueController(DataContext context, IMapper mapper) + { + _context = context; + _mapper = mapper; + } + + [HttpGet] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetConfigurationValues([FromQuery] Guid? definitionId, [FromQuery] string? scopeType, [FromQuery] Guid? scopeId) + { + var query = _context.ConfigurationValues + .AsNoTracking() + .Include(value => value.ConfigurationDefinition) + .AsQueryable(); + + if (definitionId.HasValue) + query = query.Where(value => value.ConfigurationDefinitionId == definitionId.Value); + + if (!string.IsNullOrWhiteSpace(scopeType)) + query = query.Where(value => value.ScopeType == scopeType); + + if (scopeId.HasValue) + query = query.Where(value => value.ScopeId == scopeId.Value); + + var values = query + .OrderBy(value => value.ScopeType) + .ThenBy(value => value.SortOrder) + .ThenBy(value => value.ConfigurationDefinition.Name) + .ToList(); + + return Ok(_mapper.Map>(values)); + } + + [HttpPost] + [ProducesResponseType(200, Type = typeof(Guid))] + [ProducesResponseType(400)] + public IActionResult AddConfigurationValue([FromBody] AddConfigurationValueDto configurationValue) + { + if (configurationValue == null) + return BadRequest(ModelState); + + if (!_context.ConfigurationDefinitions.Any(definition => definition.Id == configurationValue.ConfigurationDefinitionId)) + { + ModelState.AddModelError(nameof(configurationValue.ConfigurationDefinitionId), "Configuration definition was not found."); + return BadRequest(ModelState); + } + + if (!string.IsNullOrWhiteSpace(configurationValue.ValueJson)) + { + try + { + configurationValue.ValueJson = ConfigurationDocumentValidator.NormalizeAndValidate( + configurationValue.ValueJson, + ConfigurationDocumentKind.Metadata).JsonData; + } + catch (ConfigurationDocumentValidationException ex) + { + ModelState.AddModelError(nameof(configurationValue.ValueJson), ex.Message); + return BadRequest(ModelState); + } + } + + var model = _mapper.Map(configurationValue); + model.Id = Guid.NewGuid(); + model.ValueHash = TemplateVersionModel.ComputeSha256(model.ValueJson ?? model.SourcePath ?? string.Empty); + + _context.ConfigurationValues.Add(model); + _context.SaveChanges(); + + return Ok(model.Id); + } + + [HttpDelete("{id}")] + [ProducesResponseType(204)] + [ProducesResponseType(404)] + public IActionResult DeleteConfigurationValue(Guid id) + { + var value = _context.ConfigurationValues.FirstOrDefault(existing => existing.Id == id); + if (value == null) + return NotFound(); + + _context.ConfigurationValues.Remove(value); + _context.SaveChanges(); + + return NoContent(); + } + } +} diff --git a/Controllers/CredentialSecretController.cs b/Controllers/CredentialSecretController.cs new file mode 100644 index 0000000..00a9b88 --- /dev/null +++ b/Controllers/CredentialSecretController.cs @@ -0,0 +1,143 @@ +using AutoMapper; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Get; +using Microsoft.SelfService.Portal.Core.API.JsonDocuments; +using Microsoft.SelfService.Portal.Core.API.Models; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/credential-secrets")] + [ApiController] + public class CredentialSecretController : Controller + { + private readonly DataContext _context; + private readonly IMapper _mapper; + + public CredentialSecretController(DataContext context, IMapper mapper) + { + _context = context; + _mapper = mapper; + } + + [HttpGet] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetCredentialSecrets() + { + var secrets = _context.CredentialSecrets + .AsNoTracking() + .OrderBy(secret => secret.Name) + .ToList(); + + return Ok(_mapper.Map>(secrets)); + } + + [HttpGet("{id}")] + [ProducesResponseType(200, Type = typeof(GetCredentialSecretDto))] + [ProducesResponseType(404)] + public IActionResult GetCredentialSecretById(Guid id) + { + var secret = _context.CredentialSecrets + .AsNoTracking() + .FirstOrDefault(existing => existing.Id == id); + + if (secret == null) + return NotFound(); + + return Ok(_mapper.Map(secret)); + } + + [HttpGet("resolve")] + [ProducesResponseType(200, Type = typeof(GetCredentialSecretValueDto))] + [ProducesResponseType(404)] + public IActionResult ResolveCredentialSecret([FromQuery] string name) + { + var secret = _context.CredentialSecrets + .AsNoTracking() + .FirstOrDefault(existing => existing.Name == name && existing.IsEnabled); + + if (secret == null) + return NotFound(); + + return Ok(_mapper.Map(secret)); + } + + [HttpPost] + [ProducesResponseType(200, Type = typeof(Guid))] + [ProducesResponseType(400)] + public IActionResult AddCredentialSecret([FromBody] AddCredentialSecretDto credentialSecret) + { + if (credentialSecret == null) + return BadRequest(ModelState); + + if (_context.CredentialSecrets.Any(existing => existing.Name == credentialSecret.Name)) + { + ModelState.AddModelError(nameof(credentialSecret.Name), "Credential secret already exists."); + return StatusCode(422, ModelState); + } + + if (!string.IsNullOrWhiteSpace(credentialSecret.MetadataJson)) + { + try + { + credentialSecret.MetadataJson = ConfigurationDocumentValidator.NormalizeAndValidate( + credentialSecret.MetadataJson, + ConfigurationDocumentKind.Metadata).JsonData; + } + catch (ConfigurationDocumentValidationException ex) + { + ModelState.AddModelError(nameof(credentialSecret.MetadataJson), ex.Message); + return BadRequest(ModelState); + } + } + + var model = _mapper.Map(credentialSecret); + model.Id = Guid.NewGuid(); + + _context.CredentialSecrets.Add(model); + _context.SaveChanges(); + + return Ok(model.Id); + } + + [HttpPut("{id}")] + [ProducesResponseType(204)] + [ProducesResponseType(404)] + public IActionResult UpdateCredentialSecret(Guid id, [FromBody] AddCredentialSecretDto credentialSecret) + { + var existing = _context.CredentialSecrets.FirstOrDefault(secret => secret.Id == id); + if (existing == null) + return NotFound(); + + existing.Name = credentialSecret.Name; + existing.UserName = credentialSecret.UserName; + existing.SecretValue = credentialSecret.SecretValue; + existing.SecretType = credentialSecret.SecretType; + existing.MetadataJson = credentialSecret.MetadataJson; + existing.IsEnabled = credentialSecret.IsEnabled; + existing.Modified = DateTime.UtcNow; + existing.ModifiedBy = User?.Identity?.Name ?? "System"; + + _context.SaveChanges(); + + return NoContent(); + } + + [HttpDelete("{id}")] + [ProducesResponseType(204)] + [ProducesResponseType(404)] + public IActionResult DeleteCredentialSecret(Guid id) + { + var secret = _context.CredentialSecrets.FirstOrDefault(existing => existing.Id == id); + if (secret == null) + return NotFound(); + + _context.CredentialSecrets.Remove(secret); + _context.SaveChanges(); + + return NoContent(); + } + } +} diff --git a/Controllers/DeploymentArtifactController.cs b/Controllers/DeploymentArtifactController.cs new file mode 100644 index 0000000..7e4c861 --- /dev/null +++ b/Controllers/DeploymentArtifactController.cs @@ -0,0 +1,198 @@ +using AutoMapper; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.SelfService.Portal.Core.API.Context; +using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Get; +using Microsoft.SelfService.Portal.Core.API.JsonDocuments; +using Microsoft.SelfService.Portal.Core.API.Models; +using System.Text.Json; + +namespace Microsoft.SelfService.Portal.Core.API.Controllers +{ + [Route("api/deployment-artifacts")] + [ApiController] + public class DeploymentArtifactController : Controller + { + private readonly DataContext _context; + private readonly IMapper _mapper; + + public DeploymentArtifactController(DataContext context, IMapper mapper) + { + _context = context; + _mapper = mapper; + } + + [HttpGet] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + public IActionResult GetDeploymentArtifacts([FromQuery] Guid? deploymentGroupId, [FromQuery] Guid? targetId) + { + var query = _context.DeploymentArtifacts + .AsNoTracking() + .AsQueryable(); + + if (deploymentGroupId.HasValue) + query = query.Where(artifact => artifact.DeploymentGroupId == deploymentGroupId.Value); + + if (targetId.HasValue) + query = query.Where(artifact => artifact.TargetId == targetId.Value); + + var artifacts = query + .OrderByDescending(artifact => artifact.Created) + .ToList(); + + return Ok(_mapper.Map>(artifacts)); + } + + [HttpGet("{id}")] + [ProducesResponseType(200, Type = typeof(GetDeploymentArtifactDto))] + [ProducesResponseType(404)] + public IActionResult GetDeploymentArtifactById(Guid id) + { + var artifact = _context.DeploymentArtifacts + .AsNoTracking() + .FirstOrDefault(existing => existing.Id == id); + + if (artifact == null) + return NotFound(); + + return Ok(_mapper.Map(artifact)); + } + + [HttpPost] + [ProducesResponseType(200, Type = typeof(Guid))] + [ProducesResponseType(400)] + public IActionResult AddDeploymentArtifact([FromBody] AddDeploymentArtifactDto deploymentArtifact) + { + if (deploymentArtifact == null) + return BadRequest(ModelState); + + if (!_context.DeploymentGroups.Any(group => group.Id == deploymentArtifact.DeploymentGroupId)) + { + ModelState.AddModelError(nameof(deploymentArtifact.DeploymentGroupId), "Deployment group was not found."); + return BadRequest(ModelState); + } + + if (deploymentArtifact.TargetId.HasValue && !_context.Targets.Any(target => target.Id == deploymentArtifact.TargetId.Value)) + { + ModelState.AddModelError(nameof(deploymentArtifact.TargetId), "Target was not found."); + return BadRequest(ModelState); + } + + try + { + deploymentArtifact.DeploymentJson = NormalizeJson(deploymentArtifact.DeploymentJson); + deploymentArtifact.SourceJson = NormalizeOptionalJson(deploymentArtifact.SourceJson); + deploymentArtifact.ResolvedJson = NormalizeOptionalJson(deploymentArtifact.ResolvedJson); + deploymentArtifact.SourceSnapshotJson = NormalizeOptionalJson(deploymentArtifact.SourceSnapshotJson); + } + catch (ConfigurationDocumentValidationException ex) + { + ModelState.AddModelError(nameof(deploymentArtifact.DeploymentJson), ex.Message); + return BadRequest(ModelState); + } + + var model = _mapper.Map(deploymentArtifact); + model.Id = Guid.NewGuid(); + model.InputHash = TemplateVersionModel.ComputeSha256(model.SourceJson ?? model.DeploymentJson); + model.OutputHash = TemplateVersionModel.ComputeSha256(model.ResolvedJson ?? model.DeploymentJson); + model.IsStale = false; + + _context.DeploymentArtifacts.Add(model); + + if (model.TargetId.HasValue) + { + var deployment = _context.Deployments.FirstOrDefault(existing => + existing.DeploymentGroupId == model.DeploymentGroupId + && existing.TargetId == model.TargetId.Value); + + if (deployment != null) + { + deployment.CurrentArtifactId = model.Id; + deployment.SourceJson = model.SourceJson; + deployment.JSONData = model.DeploymentJson; + } + } + + _context.SaveChanges(); + + return Ok(model.Id); + } + + [HttpPost("{id}/stale-check")] + [ProducesResponseType(200, Type = typeof(GetDeploymentArtifactDto))] + [ProducesResponseType(404)] + public IActionResult CheckDeploymentArtifactStale(Guid id) + { + var artifact = _context.DeploymentArtifacts.FirstOrDefault(existing => existing.Id == id); + if (artifact == null) + return NotFound(); + + var staleReasons = BuildStaleReasons(artifact); + artifact.IsStale = staleReasons.Count > 0; + artifact.StaleReasonJson = staleReasons.Count > 0 + ? JsonSerializer.Serialize(staleReasons) + : null; + + _context.SaveChanges(); + + return Ok(_mapper.Map(artifact)); + } + + private static string NormalizeJson(string json) + { + return ConfigurationDocumentValidator.NormalizeAndValidate( + string.IsNullOrWhiteSpace(json) ? "{}" : json, + ConfigurationDocumentKind.Metadata).JsonData; + } + + private static string? NormalizeOptionalJson(string? json) + { + return string.IsNullOrWhiteSpace(json) ? null : NormalizeJson(json); + } + + private List BuildStaleReasons(DeploymentArtifactModel artifact) + { + var reasons = new List(); + if (string.IsNullOrWhiteSpace(artifact.SourceSnapshotJson)) + { + return reasons; + } + + using var snapshot = JsonDocument.Parse(artifact.SourceSnapshotJson); + if (!snapshot.RootElement.TryGetProperty("templateRevisions", out var revisions) + || revisions.ValueKind != JsonValueKind.Array) + { + return reasons; + } + + foreach (var source in revisions.EnumerateArray()) + { + if (!source.TryGetProperty("id", out var idElement) + || !Guid.TryParse(idElement.GetString(), out var revisionId) + || !source.TryGetProperty("hash", out var hashElement)) + { + continue; + } + + var current = _context.TemplateRevisions + .AsNoTracking() + .FirstOrDefault(revision => revision.Id == revisionId); + + if (current == null) + { + reasons.Add(new { Type = "TemplateRevisionMissing", RevisionId = revisionId }); + continue; + } + + var expectedHash = hashElement.GetString(); + if (!string.Equals(current.JsonHash, expectedHash, StringComparison.OrdinalIgnoreCase)) + { + reasons.Add(new { Type = "TemplateRevisionHashChanged", RevisionId = revisionId, OldHash = expectedHash, CurrentHash = current.JsonHash }); + } + } + + return reasons; + } + } +} diff --git a/Controllers/DeploymentBatchController.cs b/Controllers/DeploymentBatchController.cs index fab22b8..7b68a65 100644 --- a/Controllers/DeploymentBatchController.cs +++ b/Controllers/DeploymentBatchController.cs @@ -190,12 +190,26 @@ namespace Microsoft.SelfService.Portal.Core.API.Controllers if (!_deploymentBatchInterface.CheckDeploymentBatchById(id)) return NotFound(); - if (!_context.TemplateVersions.Any(version => version.Id == templateSelection.TemplateVersionId)) + var templateVersion = _context.TemplateVersions + .Include(version => version.TemplateRevisions) + .FirstOrDefault(version => version.Id == templateSelection.TemplateVersionId); + + if (templateVersion == null) { ModelState.AddModelError(nameof(templateSelection.TemplateVersionId), "Template version was not found."); return BadRequest(ModelState); } + var templateRevisionId = templateSelection.TemplateRevisionId + ?? templateVersion.TemplateRevisions.FirstOrDefault(revision => revision.IsCurrent)?.Id; + + if (templateRevisionId.HasValue + && !templateVersion.TemplateRevisions.Any(revision => revision.Id == templateRevisionId.Value)) + { + ModelState.AddModelError(nameof(templateSelection.TemplateRevisionId), "Template revision was not found in this template version."); + return BadRequest(ModelState); + } + var sortOrder = templateSelection.SortOrder > 0 ? templateSelection.SortOrder : GetNextTemplateSelectionSortOrder(id); @@ -210,6 +224,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Controllers model.Id = Guid.NewGuid(); model.DeploymentGroupId = id; model.SortOrder = sortOrder; + model.TemplateRevisionId = templateRevisionId; _context.DeploymentTemplateSelections.Add(model); _context.SaveChanges(); diff --git a/Controllers/DeploymentController.cs b/Controllers/DeploymentController.cs index 81bc116..beffc81 100644 --- a/Controllers/DeploymentController.cs +++ b/Controllers/DeploymentController.cs @@ -108,7 +108,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Controllers var queueJobId = _queueJobService.EnqueueDeploymentRequest( request.DeploymentGroupId, request.TargetIds, - request.JsonData); + request.JsonData, + request.DeploymentArtifactId); return Ok(queueJobId); } diff --git a/Controllers/TemplateController.cs b/Controllers/TemplateController.cs index 06f2ba5..a5b246f 100644 --- a/Controllers/TemplateController.cs +++ b/Controllers/TemplateController.cs @@ -3,6 +3,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.SelfService.Portal.Core.API.Dto.Template.Add; using Microsoft.SelfService.Portal.Core.API.Dto.Template.Edit; using Microsoft.SelfService.Portal.Core.API.Dto.Template.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Get; using Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Add; using Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Get; using Microsoft.SelfService.Portal.Core.API.Interfaces; @@ -223,6 +226,77 @@ namespace Microsoft.SelfService.Portal.Core.API.Controllers return Ok(version.Id); } + [HttpGet("{Id}/Versions/{VersionId}/Revisions")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + [ProducesResponseType(404)] + public IActionResult GetTemplateRevisions(Guid Id, Guid VersionId) + { + if (!_templateInterface.CheckTemplateVersionById(Id, VersionId)) + return NotFound(); + + return Ok(_mapper.Map>(_templateInterface.GetTemplateRevisions(Id, VersionId))); + } + + [HttpGet("{Id}/Versions/{VersionId}/Revisions/{RevisionId}")] + [ProducesResponseType(200, Type = typeof(GetTemplateRevisionDto))] + [ProducesResponseType(404)] + public IActionResult GetTemplateRevisionById(Guid Id, Guid VersionId, Guid RevisionId) + { + var revision = _templateInterface.GetTemplateRevisionById(Id, VersionId, RevisionId); + if (revision == null) + return NotFound(); + + return Ok(_mapper.Map(revision)); + } + + [HttpGet("{Id}/Versions/{VersionId}/Revisions/{RevisionId}/Definitions")] + [ProducesResponseType(200, Type = typeof(IEnumerable))] + [ProducesResponseType(404)] + public IActionResult GetTemplateRevisionDefinitions(Guid Id, Guid VersionId, Guid RevisionId) + { + var revision = _templateInterface.GetTemplateRevisionById(Id, VersionId, RevisionId); + if (revision == null) + return NotFound(); + + return Ok(_mapper.Map>(revision.ConfigurationDefinitions)); + } + + [HttpPost("{Id}/Versions/{VersionId}/Revisions")] + [ProducesResponseType(200, Type = typeof(Guid))] + [ProducesResponseType(400)] + [ProducesResponseType(404)] + public IActionResult AddTemplateRevision(Guid Id, Guid VersionId, [FromBody] AddTemplateRevisionDto templateRevision) + { + if (templateRevision == null) + return BadRequest(ModelState); + + if (!_templateInterface.CheckTemplateVersionById(Id, VersionId)) + return NotFound(); + + if (!ModelState.IsValid) + return BadRequest(ModelState); + + var revision = _mapper.Map(templateRevision); + revision.PublishedBy = templateRevision.PublishedBy ?? User?.Identity?.Name ?? "System"; + + try + { + if (!_templateInterface.AddTemplateRevision(Id, VersionId, revision, templateRevision.Publish)) + { + ModelState.AddModelError("", "Something went wrong while saving template revision"); + return StatusCode(500, ModelState); + } + } + catch (ConfigurationDocumentValidationException ex) + { + ModelState.AddModelError(nameof(templateRevision.JsonData), ex.Message); + return BadRequest(ModelState); + } + + var savedRevision = _templateInterface.GetCurrentTemplateRevision(VersionId); + return Ok(savedRevision?.Id ?? revision.Id); + } + [HttpPost("{Id}/Versions/{VersionId}/Publish")] [ProducesResponseType(204)] [ProducesResponseType(404)] diff --git a/Dto/Auth/CreateManagedTokenRequestDto.cs b/Dto/Auth/CreateManagedTokenRequestDto.cs new file mode 100644 index 0000000..1ba0d0e --- /dev/null +++ b/Dto/Auth/CreateManagedTokenRequestDto.cs @@ -0,0 +1,11 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.Auth +{ + public class CreateManagedTokenRequestDto + { + public string Name { get; set; } = string.Empty; + + public string Scope { get; set; } = string.Empty; + + public DateTime? ExpiresAt { get; set; } + } +} diff --git a/Dto/Auth/CreateManagedTokenResponseDto.cs b/Dto/Auth/CreateManagedTokenResponseDto.cs new file mode 100644 index 0000000..fc72274 --- /dev/null +++ b/Dto/Auth/CreateManagedTokenResponseDto.cs @@ -0,0 +1,17 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.Auth +{ + public class CreateManagedTokenResponseDto + { + public Guid Id { get; set; } + + public string AccessToken { get; set; } = string.Empty; + + public string TokenType { get; set; } = "Bearer"; + + public int ExpiresIn { get; set; } + + public DateTime ExpiresAt { get; set; } + + public string Scope { get; set; } = string.Empty; + } +} diff --git a/Dto/Auth/GetManagedTokenDto.cs b/Dto/Auth/GetManagedTokenDto.cs new file mode 100644 index 0000000..e5bb024 --- /dev/null +++ b/Dto/Auth/GetManagedTokenDto.cs @@ -0,0 +1,29 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.Auth +{ + public class GetManagedTokenDto + { + public Guid Id { get; set; } + + public string Subject { get; set; } = string.Empty; + + public string SubjectType { get; set; } = string.Empty; + + public string? ClientId { get; set; } + + public string Name { get; set; } = string.Empty; + + public string Scope { get; set; } = string.Empty; + + public DateTime IssuedAt { get; set; } + + public DateTime ExpiresAt { get; set; } + + public DateTime? RevokedAt { get; set; } + + public string? RevokedBy { get; set; } + + public DateTime? LastUsedAt { get; set; } + + public bool IsActive { get; set; } + } +} diff --git a/Dto/Auth/TokenRequestDto.cs b/Dto/Auth/TokenRequestDto.cs new file mode 100644 index 0000000..759e514 --- /dev/null +++ b/Dto/Auth/TokenRequestDto.cs @@ -0,0 +1,9 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.Auth +{ + public class TokenRequestDto + { + public string ClientId { get; set; } = string.Empty; + public string ClientSecret { get; set; } = string.Empty; + public string? Scope { get; set; } + } +} diff --git a/Dto/Auth/TokenResponseDto.cs b/Dto/Auth/TokenResponseDto.cs new file mode 100644 index 0000000..751db76 --- /dev/null +++ b/Dto/Auth/TokenResponseDto.cs @@ -0,0 +1,10 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.Auth +{ + public class TokenResponseDto + { + public string AccessToken { get; set; } = string.Empty; + public string TokenType { get; set; } = "Bearer"; + public int ExpiresIn { get; set; } + public string Scope { get; set; } = string.Empty; + } +} diff --git a/Dto/ConfigurationDefinition/Add/AddConfigurationDefinitionDto.cs b/Dto/ConfigurationDefinition/Add/AddConfigurationDefinitionDto.cs new file mode 100644 index 0000000..4b85e55 --- /dev/null +++ b/Dto/ConfigurationDefinition/Add/AddConfigurationDefinitionDto.cs @@ -0,0 +1,10 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Add +{ + public class AddConfigurationDefinitionDto + { + public Guid? TemplateRevisionId { get; set; } + public string Kind { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public string PropertiesJson { get; set; } = "{}"; + } +} diff --git a/Dto/ConfigurationDefinition/Edit/EditConfigurationDefinitionDto.cs b/Dto/ConfigurationDefinition/Edit/EditConfigurationDefinitionDto.cs new file mode 100644 index 0000000..999804f --- /dev/null +++ b/Dto/ConfigurationDefinition/Edit/EditConfigurationDefinitionDto.cs @@ -0,0 +1,10 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Edit +{ + public class EditConfigurationDefinitionDto + { + public Guid? TemplateRevisionId { get; set; } + public string Kind { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public string PropertiesJson { get; set; } = "{}"; + } +} diff --git a/Dto/ConfigurationDefinition/Get/GetConfigurationDefinitionDto.cs b/Dto/ConfigurationDefinition/Get/GetConfigurationDefinitionDto.cs new file mode 100644 index 0000000..5cce48e --- /dev/null +++ b/Dto/ConfigurationDefinition/Get/GetConfigurationDefinitionDto.cs @@ -0,0 +1,13 @@ +using Microsoft.SelfService.Portal.Core.API.Dto; + +namespace Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Get +{ + public class GetConfigurationDefinitionDto : BaseDetailsDto + { + public Guid? TemplateRevisionId { get; set; } + public string Kind { get; set; } = string.Empty; + public string Name { get; set; } = string.Empty; + public string PropertiesJson { get; set; } = "{}"; + public string DefinitionHash { get; set; } = string.Empty; + } +} diff --git a/Dto/ConfigurationValue/Add/AddConfigurationValueDto.cs b/Dto/ConfigurationValue/Add/AddConfigurationValueDto.cs new file mode 100644 index 0000000..fff19f6 --- /dev/null +++ b/Dto/ConfigurationValue/Add/AddConfigurationValueDto.cs @@ -0,0 +1,13 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Add +{ + public class AddConfigurationValueDto + { + public Guid ConfigurationDefinitionId { get; set; } + public string ScopeType { get; set; } = "TemplateRevision"; + public Guid ScopeId { get; set; } + public string ValueSourceType { get; set; } = "Static"; + public string? SourcePath { get; set; } + public string? ValueJson { get; set; } + public int SortOrder { get; set; } + } +} diff --git a/Dto/ConfigurationValue/Get/GetConfigurationValueDto.cs b/Dto/ConfigurationValue/Get/GetConfigurationValueDto.cs new file mode 100644 index 0000000..6e9d0e0 --- /dev/null +++ b/Dto/ConfigurationValue/Get/GetConfigurationValueDto.cs @@ -0,0 +1,16 @@ +using Microsoft.SelfService.Portal.Core.API.Dto; + +namespace Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Get +{ + public class GetConfigurationValueDto : BaseDetailsDto + { + public Guid ConfigurationDefinitionId { get; set; } + public string ScopeType { get; set; } = string.Empty; + public Guid ScopeId { get; set; } + public string ValueSourceType { get; set; } = string.Empty; + public string? SourcePath { get; set; } + public string? ValueJson { get; set; } + public string ValueHash { get; set; } = string.Empty; + public int SortOrder { get; set; } + } +} diff --git a/Dto/CredentialSecret/Add/AddCredentialSecretDto.cs b/Dto/CredentialSecret/Add/AddCredentialSecretDto.cs new file mode 100644 index 0000000..5d3fd6f --- /dev/null +++ b/Dto/CredentialSecret/Add/AddCredentialSecretDto.cs @@ -0,0 +1,12 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Add +{ + public class AddCredentialSecretDto + { + public string Name { get; set; } = string.Empty; + public string? UserName { get; set; } + public string SecretValue { get; set; } = string.Empty; + public string SecretType { get; set; } = "Credential"; + public string? MetadataJson { get; set; } + public bool IsEnabled { get; set; } = true; + } +} diff --git a/Dto/CredentialSecret/Get/GetCredentialSecretDto.cs b/Dto/CredentialSecret/Get/GetCredentialSecretDto.cs new file mode 100644 index 0000000..ddde8d8 --- /dev/null +++ b/Dto/CredentialSecret/Get/GetCredentialSecretDto.cs @@ -0,0 +1,13 @@ +using Microsoft.SelfService.Portal.Core.API.Dto; + +namespace Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Get +{ + public class GetCredentialSecretDto : BaseDetailsDto + { + public string Name { get; set; } = string.Empty; + public string? UserName { get; set; } + public string SecretType { get; set; } = "Credential"; + public string? MetadataJson { get; set; } + public bool IsEnabled { get; set; } + } +} diff --git a/Dto/CredentialSecret/Get/GetCredentialSecretValueDto.cs b/Dto/CredentialSecret/Get/GetCredentialSecretValueDto.cs new file mode 100644 index 0000000..261ce6a --- /dev/null +++ b/Dto/CredentialSecret/Get/GetCredentialSecretValueDto.cs @@ -0,0 +1,11 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Get +{ + public class GetCredentialSecretValueDto + { + public string Name { get; set; } = string.Empty; + public string? UserName { get; set; } + public string SecretValue { get; set; } = string.Empty; + public string SecretType { get; set; } = "Credential"; + public string? MetadataJson { get; set; } + } +} diff --git a/Dto/Deployment/Add/AddDeploymentRequestDto.cs b/Dto/Deployment/Add/AddDeploymentRequestDto.cs index ed429b9..3daa5f0 100644 --- a/Dto/Deployment/Add/AddDeploymentRequestDto.cs +++ b/Dto/Deployment/Add/AddDeploymentRequestDto.cs @@ -3,6 +3,7 @@ public class AddDeploymentRequestDto { public Guid DeploymentGroupId { get; set; } + public Guid? DeploymentArtifactId { get; set; } public ICollection TargetIds { get; set; } = new List(); public string JsonData { get; set; } = "{}"; } diff --git a/Dto/DeploymentArtifact/Add/AddDeploymentArtifactDto.cs b/Dto/DeploymentArtifact/Add/AddDeploymentArtifactDto.cs new file mode 100644 index 0000000..9a6ddf8 --- /dev/null +++ b/Dto/DeploymentArtifact/Add/AddDeploymentArtifactDto.cs @@ -0,0 +1,14 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Add +{ + public class AddDeploymentArtifactDto + { + public Guid DeploymentGroupId { get; set; } + public Guid? TargetId { get; set; } + public string ArtifactType { get; set; } = "ResolvedConfigurationData"; + public string Status { get; set; } = "Pending"; + public string DeploymentJson { get; set; } = "{}"; + public string? SourceJson { get; set; } + public string? ResolvedJson { get; set; } + public string? SourceSnapshotJson { get; set; } + } +} diff --git a/Dto/DeploymentArtifact/Get/GetDeploymentArtifactDto.cs b/Dto/DeploymentArtifact/Get/GetDeploymentArtifactDto.cs new file mode 100644 index 0000000..81eb351 --- /dev/null +++ b/Dto/DeploymentArtifact/Get/GetDeploymentArtifactDto.cs @@ -0,0 +1,20 @@ +using Microsoft.SelfService.Portal.Core.API.Dto; + +namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Get +{ + public class GetDeploymentArtifactDto : BaseDetailsDto + { + public Guid DeploymentGroupId { get; set; } + public Guid? TargetId { get; set; } + public string ArtifactType { get; set; } = string.Empty; + public string Status { get; set; } = string.Empty; + public string DeploymentJson { get; set; } = "{}"; + public string? SourceJson { get; set; } + public string? ResolvedJson { get; set; } + public string? SourceSnapshotJson { get; set; } + public string InputHash { get; set; } = string.Empty; + public string OutputHash { get; set; } = string.Empty; + public bool IsStale { get; set; } + public string? StaleReasonJson { get; set; } + } +} diff --git a/Dto/DeploymentComposition/Add/AddDeploymentTemplateSelectionDto.cs b/Dto/DeploymentComposition/Add/AddDeploymentTemplateSelectionDto.cs index 7a336d3..1979616 100644 --- a/Dto/DeploymentComposition/Add/AddDeploymentTemplateSelectionDto.cs +++ b/Dto/DeploymentComposition/Add/AddDeploymentTemplateSelectionDto.cs @@ -3,6 +3,7 @@ public class AddDeploymentTemplateSelectionDto { public Guid TemplateVersionId { get; set; } + public Guid? TemplateRevisionId { get; set; } public string TemplateRole { get; set; } = "Service"; public int SortOrder { get; set; } public string? Alias { get; set; } diff --git a/Dto/DeploymentComposition/Get/GetDeploymentTemplateSelectionDto.cs b/Dto/DeploymentComposition/Get/GetDeploymentTemplateSelectionDto.cs index 592b8ea..0d4dc6f 100644 --- a/Dto/DeploymentComposition/Get/GetDeploymentTemplateSelectionDto.cs +++ b/Dto/DeploymentComposition/Get/GetDeploymentTemplateSelectionDto.cs @@ -6,6 +6,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Dto.DeploymentComposition.Get { public Guid DeploymentGroupId { get; set; } public Guid TemplateVersionId { get; set; } + public Guid? TemplateRevisionId { get; set; } public string TemplateRole { get; set; } = string.Empty; public int SortOrder { get; set; } public string? Alias { get; set; } diff --git a/Dto/TemplateRevision/Add/AddTemplateRevisionDto.cs b/Dto/TemplateRevision/Add/AddTemplateRevisionDto.cs new file mode 100644 index 0000000..2a10f1e --- /dev/null +++ b/Dto/TemplateRevision/Add/AddTemplateRevisionDto.cs @@ -0,0 +1,10 @@ +namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Add +{ + public class AddTemplateRevisionDto + { + public string JsonData { get; set; } = "{}"; + public string SchemaVersion { get; set; } = "1.0"; + public bool Publish { get; set; } + public string? PublishedBy { get; set; } + } +} diff --git a/Dto/TemplateRevision/Get/GetTemplateRevisionDto.cs b/Dto/TemplateRevision/Get/GetTemplateRevisionDto.cs new file mode 100644 index 0000000..8b18a02 --- /dev/null +++ b/Dto/TemplateRevision/Get/GetTemplateRevisionDto.cs @@ -0,0 +1,17 @@ +using Microsoft.SelfService.Portal.Core.API.Dto; + +namespace Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Get +{ + public class GetTemplateRevisionDto : BaseDetailsDto + { + public Guid TemplateVersionId { get; set; } + public int RevisionNumber { get; set; } + public string JsonData { get; set; } = "{}"; + public string JsonHash { get; set; } = string.Empty; + public string SchemaVersion { get; set; } = "1.0"; + public bool IsCurrent { get; set; } + public bool IsPublished { get; set; } + public DateTime? PublishedAt { get; set; } + public string? PublishedBy { get; set; } + } +} diff --git a/Helper/MappingProfilesHelper.cs b/Helper/MappingProfilesHelper.cs index 272278e..62d748c 100644 --- a/Helper/MappingProfilesHelper.cs +++ b/Helper/MappingProfilesHelper.cs @@ -23,6 +23,17 @@ using Microsoft.SelfService.Portal.Core.API.Dto.Template.Add; using Microsoft.SelfService.Portal.Core.API.Dto.Template.Edit; using Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Add; using Microsoft.SelfService.Portal.Core.API.Dto.TemplateVersion.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.TemplateRevision.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Edit; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationDefinition.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.ConfigurationValue.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.DeploymentArtifact.Get; +using Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Add; +using Microsoft.SelfService.Portal.Core.API.Dto.CredentialSecret.Get; using Microsoft.SelfService.Portal.Core.API.Dto.Service.Get; using Microsoft.SelfService.Portal.Core.API.Dto.Service.Add; using Microsoft.SelfService.Portal.Core.API.Dto.Service.Edit; @@ -131,6 +142,26 @@ namespace Microsoft.SelfService.Portal.Core.API.Helper CreateMap(); CreateMap(); + /** Template Revision Model **/ + CreateMap(); + CreateMap(); + CreateMap(); + + /** Configuration Data Model **/ + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + + /** Deployment Artifact Model **/ + CreateMap(); + CreateMap(); + + /** Credential Secret Model **/ + CreateMap(); + CreateMap(); + /** Service Model **/ CreateMap(); CreateMap(); diff --git a/Interfaces/IQueueJobService.cs b/Interfaces/IQueueJobService.cs index eb64eed..cfb7fee 100644 --- a/Interfaces/IQueueJobService.cs +++ b/Interfaces/IQueueJobService.cs @@ -3,7 +3,7 @@ public interface IQueueJobService { Guid EnqueueTemplateJsonChanged(Guid templateId, string oldJsonData, string newJsonData); - Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection targetIds, string jsonData); + Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection targetIds, string jsonData, Guid? deploymentArtifactId = null); bool RetryQueueJob(Guid queueJobId); bool ApproveQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment); bool RejectQueueJobStep(Guid queueJobStepId, string approvedBy, string? comment); diff --git a/Interfaces/ITemplateInterface.cs b/Interfaces/ITemplateInterface.cs index af6bfa5..463a580 100644 --- a/Interfaces/ITemplateInterface.cs +++ b/Interfaces/ITemplateInterface.cs @@ -18,6 +18,10 @@ namespace Microsoft.SelfService.Portal.Core.API.Interfaces ICollection GetTemplateVersions(Guid templateId); TemplateVersionModel? GetTemplateVersionById(Guid templateId, Guid versionId); TemplateVersionModel? GetPublishedTemplateVersion(Guid templateId); + ICollection GetTemplateRevisions(Guid templateId, Guid versionId); + TemplateRevisionModel? GetTemplateRevisionById(Guid templateId, Guid versionId, Guid revisionId); + TemplateRevisionModel? GetCurrentTemplateRevision(Guid versionId); + bool AddTemplateRevision(Guid templateId, Guid versionId, TemplateRevisionModel revision, bool publish); bool AddTemplateVersion(Guid templateId, TemplateVersionModel version, bool publish); bool PublishTemplateVersion(Guid templateId, Guid versionId, string? publishedBy); bool CheckTemplateVersionById(Guid templateId, Guid versionId); diff --git a/Microsoft.SelfService.Portal.Core.API.csproj b/Microsoft.SelfService.Portal.Core.API.csproj index 1a31362..cce31bc 100644 --- a/Microsoft.SelfService.Portal.Core.API.csproj +++ b/Microsoft.SelfService.Portal.Core.API.csproj @@ -5,10 +5,12 @@ enable enable 9c90fee1-4576-4f20-be83-715728173b96 + $(DefaultItemExcludes);buildcheck\** + diff --git a/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.Designer.cs b/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.Designer.cs new file mode 100644 index 0000000..76aeea9 --- /dev/null +++ b/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.Designer.cs @@ -0,0 +1,3390 @@ +// +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("20260709070614_AddTemplateRevisionArtifactsAndCredentialStore")] + partial class AddTemplateRevisionArtifactsAndCredentialStore + { + /// + 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"); + }); + }); + + 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"); + }); + }); + + 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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.cs b/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.cs new file mode 100644 index 0000000..f950680 --- /dev/null +++ b/Migrations/20260709070614_AddTemplateRevisionArtifactsAndCredentialStore.cs @@ -0,0 +1,540 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class AddTemplateRevisionArtifactsAndCredentialStore : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "TemplateRole", + table: "DeploymentTemplateSelections", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 4) + .OldAnnotation("Relational:ColumnOrder", 3); + + migrationBuilder.AlterColumn( + name: "SortOrder", + table: "DeploymentTemplateSelections", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("Relational:ColumnOrder", 5) + .OldAnnotation("Relational:ColumnOrder", 4); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "DeploymentTemplateSelections", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true) + .Annotation("Relational:ColumnOrder", 6) + .OldAnnotation("Relational:ColumnOrder", 5); + + migrationBuilder.AddColumn( + name: "TemplateRevisionId", + table: "DeploymentTemplateSelections", + type: "uniqueidentifier", + nullable: true) + .Annotation("Relational:ColumnOrder", 3); + + migrationBuilder.AlterColumn( + name: "Status", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 6) + .OldAnnotation("Relational:ColumnOrder", 4); + + migrationBuilder.AlterColumn( + name: "JSONData", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 7) + .OldAnnotation("Relational:ColumnOrder", 5); + + migrationBuilder.AddColumn( + name: "CurrentArtifactId", + table: "DeploymentExecutions", + type: "uniqueidentifier", + nullable: true) + .Annotation("Relational:ColumnOrder", 5); + + migrationBuilder.AddColumn( + name: "OverridesJson", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: true) + .Annotation("Relational:ColumnOrder", 8); + + migrationBuilder.AddColumn( + name: "SourceJson", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: true) + .Annotation("Relational:ColumnOrder", 9); + + migrationBuilder.AddColumn( + name: "TemplateRevisionId", + table: "DeploymentExecutions", + type: "uniqueidentifier", + nullable: true) + .Annotation("Relational:ColumnOrder", 4); + + migrationBuilder.CreateTable( + name: "CredentialSecrets", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + Name = table.Column(type: "nvarchar(450)", nullable: false), + UserName = table.Column(type: "nvarchar(max)", nullable: true), + SecretValue = table.Column(type: "nvarchar(max)", nullable: false), + SecretType = table.Column(type: "nvarchar(max)", nullable: false), + MetadataJson = table.Column(type: "nvarchar(max)", nullable: true), + IsEnabled = table.Column(type: "bit", nullable: false), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CredentialSecrets", x => x.Id); + table.CheckConstraint("CK_CredentialSecrets_MetadataJson_IsJson", "[MetadataJson] IS NULL OR ISJSON([MetadataJson]) = 1"); + }); + + migrationBuilder.CreateTable( + name: "DeploymentArtifacts", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + DeploymentGroupId = table.Column(type: "uniqueidentifier", nullable: false), + DeploymentTargetId = table.Column(type: "uniqueidentifier", nullable: true), + TargetId = table.Column(type: "uniqueidentifier", nullable: true), + ArtifactType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Status = table.Column(type: "nvarchar(max)", nullable: false), + DeploymentJson = table.Column(type: "nvarchar(max)", nullable: false), + SourceJson = table.Column(type: "nvarchar(max)", nullable: true), + ResolvedJson = table.Column(type: "nvarchar(max)", nullable: true), + SourceSnapshotJson = table.Column(type: "nvarchar(max)", nullable: true), + InputHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + OutputHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsStale = table.Column(type: "bit", nullable: false), + StaleReasonJson = table.Column(type: "nvarchar(max)", nullable: true), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DeploymentArtifacts", x => x.Id); + table.CheckConstraint("CK_DeploymentArtifacts_DeploymentJson_IsJson", "ISJSON([DeploymentJson]) = 1"); + table.CheckConstraint("CK_DeploymentArtifacts_ResolvedJson_IsJson", "[ResolvedJson] IS NULL OR ISJSON([ResolvedJson]) = 1"); + table.CheckConstraint("CK_DeploymentArtifacts_SourceJson_IsJson", "[SourceJson] IS NULL OR ISJSON([SourceJson]) = 1"); + table.CheckConstraint("CK_DeploymentArtifacts_SourceSnapshotJson_IsJson", "[SourceSnapshotJson] IS NULL OR ISJSON([SourceSnapshotJson]) = 1"); + table.ForeignKey( + name: "FK_DeploymentArtifacts_DeploymentBatches_DeploymentGroupId", + column: x => x.DeploymentGroupId, + principalTable: "DeploymentBatches", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_DeploymentArtifacts_DeploymentExecutions_TargetId_DeploymentGroupId", + columns: x => new { x.TargetId, x.DeploymentGroupId }, + principalTable: "DeploymentExecutions", + principalColumns: new[] { "TargetId", "DeploymentBatchId" }); + table.ForeignKey( + name: "FK_DeploymentArtifacts_Targets_TargetId", + column: x => x.TargetId, + principalTable: "Targets", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "TemplateRevisions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + TemplateVersionId = table.Column(type: "uniqueidentifier", nullable: false), + RevisionNumber = table.Column(type: "int", nullable: false), + JsonData = table.Column(type: "nvarchar(max)", nullable: false), + JsonHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SchemaVersion = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + IsCurrent = table.Column(type: "bit", nullable: false), + IsPublished = table.Column(type: "bit", nullable: false), + PublishedAt = table.Column(type: "datetime2", nullable: true), + PublishedBy = table.Column(type: "nvarchar(max)", nullable: true), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TemplateRevisions", x => x.Id); + table.CheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + table.ForeignKey( + name: "FK_TemplateRevisions_TemplateVersions_TemplateVersionId", + column: x => x.TemplateVersionId, + principalTable: "TemplateVersions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationDefinitions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + TemplateRevisionId = table.Column(type: "uniqueidentifier", nullable: true), + Kind = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + PropertiesJson = table.Column(type: "nvarchar(max)", nullable: false), + DefinitionHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationDefinitions", x => x.Id); + table.CheckConstraint("CK_ConfigurationDefinitions_PropertiesJson_IsJson", "ISJSON([PropertiesJson]) = 1"); + table.ForeignKey( + name: "FK_ConfigurationDefinitions_TemplateRevisions_TemplateRevisionId", + column: x => x.TemplateRevisionId, + principalTable: "TemplateRevisions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ConfigurationValues", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + ConfigurationDefinitionId = table.Column(type: "uniqueidentifier", nullable: false), + ScopeType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ScopeId = table.Column(type: "uniqueidentifier", nullable: false), + ValueSourceType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SourcePath = table.Column(type: "nvarchar(max)", nullable: true), + ValueJson = table.Column(type: "nvarchar(max)", nullable: true), + ValueHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SortOrder = table.Column(type: "int", nullable: false), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConfigurationValues", x => x.Id); + table.CheckConstraint("CK_ConfigurationValues_ValueJson_IsJson", "[ValueJson] IS NULL OR ISJSON([ValueJson]) = 1"); + table.ForeignKey( + name: "FK_ConfigurationValues_ConfigurationDefinitions_ConfigurationDefinitionId", + column: x => x.ConfigurationDefinitionId, + principalTable: "ConfigurationDefinitions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.UpdateData( + table: "DeploymentExecutions", + keyColumns: new[] { "DeploymentBatchId", "TargetId" }, + keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000001"), new Guid("30000000-0000-0000-0000-000000000004") }, + columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, + values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000003") }); + + migrationBuilder.UpdateData( + table: "DeploymentExecutions", + keyColumns: new[] { "DeploymentBatchId", "TargetId" }, + keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000001"), new Guid("30000000-0000-0000-0000-000000000005") }, + columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, + values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000003") }); + + migrationBuilder.UpdateData( + table: "DeploymentExecutions", + keyColumns: new[] { "DeploymentBatchId", "TargetId" }, + keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000101") }, + columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, + values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); + + migrationBuilder.UpdateData( + table: "DeploymentExecutions", + keyColumns: new[] { "DeploymentBatchId", "TargetId" }, + keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000102") }, + columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, + values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); + + migrationBuilder.UpdateData( + table: "DeploymentExecutions", + keyColumns: new[] { "DeploymentBatchId", "TargetId" }, + keyValues: new object[] { new Guid("80000000-0000-0000-0000-000000000101"), new Guid("30000000-0000-0000-0000-000000000103") }, + columns: new[] { "CurrentArtifactId", "OverridesJson", "SourceJson", "TemplateRevisionId" }, + values: new object[] { null, null, null, new Guid("72000000-0000-0000-0000-000000000103") }); + + migrationBuilder.UpdateData( + table: "DeploymentTemplateSelections", + keyColumn: "Id", + keyValue: new Guid("82000000-0000-0000-0000-000000000001"), + column: "TemplateRevisionId", + value: new Guid("72000000-0000-0000-0000-000000000003")); + + migrationBuilder.UpdateData( + table: "DeploymentTemplateSelections", + keyColumn: "Id", + keyValue: new Guid("82000000-0000-0000-0000-000000000101"), + column: "TemplateRevisionId", + value: new Guid("72000000-0000-0000-0000-000000000101")); + + migrationBuilder.UpdateData( + table: "DeploymentTemplateSelections", + keyColumn: "Id", + keyValue: new Guid("82000000-0000-0000-0000-000000000102"), + column: "TemplateRevisionId", + value: new Guid("72000000-0000-0000-0000-000000000102")); + + migrationBuilder.UpdateData( + table: "DeploymentTemplateSelections", + keyColumn: "Id", + keyValue: new Guid("82000000-0000-0000-0000-000000000103"), + column: "TemplateRevisionId", + value: new Guid("72000000-0000-0000-0000-000000000103")); + + migrationBuilder.UpdateData( + table: "DeploymentTemplateSelections", + keyColumn: "Id", + keyValue: new Guid("82000000-0000-0000-0000-000000000104"), + column: "TemplateRevisionId", + value: new Guid("72000000-0000-0000-0000-000000000104")); + + migrationBuilder.InsertData( + table: "TemplateRevisions", + columns: new[] { "Id", "Created", "CreatedBy", "IsCurrent", "IsPublished", "JsonData", "JsonHash", "Modified", "ModifiedBy", "PublishedAt", "PublishedBy", "RevisionNumber", "SchemaVersion", "TemplateVersionId" }, + values: new object[,] + { + { new Guid("72000000-0000-0000-0000-000000000001"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000001") }, + { new Guid("72000000-0000-0000-0000-000000000002"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000002") }, + { new Guid("72000000-0000-0000-0000-000000000003"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000003") }, + { new Guid("72000000-0000-0000-0000-000000000004"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000004") }, + { new Guid("72000000-0000-0000-0000-000000000101"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000101") }, + { new Guid("72000000-0000-0000-0000-000000000102"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000102") }, + { new Guid("72000000-0000-0000-0000-000000000103"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000103") }, + { new Guid("72000000-0000-0000-0000-000000000104"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, true, "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", 1, "1.0", new Guid("71000000-0000-0000-0000-000000000104") } + }); + + migrationBuilder.CreateIndex( + name: "IX_DeploymentTemplateSelections_TemplateRevisionId", + table: "DeploymentTemplateSelections", + column: "TemplateRevisionId"); + + migrationBuilder.CreateIndex( + name: "IX_DeploymentExecutions_CurrentArtifactId", + table: "DeploymentExecutions", + column: "CurrentArtifactId"); + + migrationBuilder.CreateIndex( + name: "IX_DeploymentExecutions_TemplateRevisionId", + table: "DeploymentExecutions", + column: "TemplateRevisionId"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationDefinitions_TemplateRevisionId_Kind_Name", + table: "ConfigurationDefinitions", + columns: new[] { "TemplateRevisionId", "Kind", "Name" }, + unique: true, + filter: "[TemplateRevisionId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_ConfigurationValues_ConfigurationDefinitionId_ScopeType_ScopeId_SortOrder", + table: "ConfigurationValues", + columns: new[] { "ConfigurationDefinitionId", "ScopeType", "ScopeId", "SortOrder" }); + + migrationBuilder.CreateIndex( + name: "IX_CredentialSecrets_Name", + table: "CredentialSecrets", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_DeploymentArtifacts_DeploymentGroupId", + table: "DeploymentArtifacts", + column: "DeploymentGroupId"); + + migrationBuilder.CreateIndex( + name: "IX_DeploymentArtifacts_TargetId_DeploymentGroupId", + table: "DeploymentArtifacts", + columns: new[] { "TargetId", "DeploymentGroupId" }); + + migrationBuilder.CreateIndex( + name: "IX_TemplateRevisions_TemplateVersionId", + table: "TemplateRevisions", + column: "TemplateVersionId", + unique: true, + filter: "[IsCurrent] = 1"); + + migrationBuilder.CreateIndex( + name: "IX_TemplateRevisions_TemplateVersionId_RevisionNumber", + table: "TemplateRevisions", + columns: new[] { "TemplateVersionId", "RevisionNumber" }, + unique: true); + + migrationBuilder.AddForeignKey( + name: "FK_DeploymentExecutions_DeploymentArtifacts_CurrentArtifactId", + table: "DeploymentExecutions", + column: "CurrentArtifactId", + principalTable: "DeploymentArtifacts", + principalColumn: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_DeploymentExecutions_TemplateRevisions_TemplateRevisionId", + table: "DeploymentExecutions", + column: "TemplateRevisionId", + principalTable: "TemplateRevisions", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_DeploymentTemplateSelections_TemplateRevisions_TemplateRevisionId", + table: "DeploymentTemplateSelections", + column: "TemplateRevisionId", + principalTable: "TemplateRevisions", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_DeploymentExecutions_DeploymentArtifacts_CurrentArtifactId", + table: "DeploymentExecutions"); + + migrationBuilder.DropForeignKey( + name: "FK_DeploymentExecutions_TemplateRevisions_TemplateRevisionId", + table: "DeploymentExecutions"); + + migrationBuilder.DropForeignKey( + name: "FK_DeploymentTemplateSelections_TemplateRevisions_TemplateRevisionId", + table: "DeploymentTemplateSelections"); + + migrationBuilder.DropTable( + name: "ConfigurationValues"); + + migrationBuilder.DropTable( + name: "CredentialSecrets"); + + migrationBuilder.DropTable( + name: "DeploymentArtifacts"); + + migrationBuilder.DropTable( + name: "ConfigurationDefinitions"); + + migrationBuilder.DropTable( + name: "TemplateRevisions"); + + migrationBuilder.DropIndex( + name: "IX_DeploymentTemplateSelections_TemplateRevisionId", + table: "DeploymentTemplateSelections"); + + migrationBuilder.DropIndex( + name: "IX_DeploymentExecutions_CurrentArtifactId", + table: "DeploymentExecutions"); + + migrationBuilder.DropIndex( + name: "IX_DeploymentExecutions_TemplateRevisionId", + table: "DeploymentExecutions"); + + migrationBuilder.DropColumn( + name: "TemplateRevisionId", + table: "DeploymentTemplateSelections"); + + migrationBuilder.DropColumn( + name: "CurrentArtifactId", + table: "DeploymentExecutions"); + + migrationBuilder.DropColumn( + name: "OverridesJson", + table: "DeploymentExecutions"); + + migrationBuilder.DropColumn( + name: "SourceJson", + table: "DeploymentExecutions"); + + migrationBuilder.DropColumn( + name: "TemplateRevisionId", + table: "DeploymentExecutions"); + + migrationBuilder.AlterColumn( + name: "TemplateRole", + table: "DeploymentTemplateSelections", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 3) + .OldAnnotation("Relational:ColumnOrder", 4); + + migrationBuilder.AlterColumn( + name: "SortOrder", + table: "DeploymentTemplateSelections", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("Relational:ColumnOrder", 4) + .OldAnnotation("Relational:ColumnOrder", 5); + + migrationBuilder.AlterColumn( + name: "Alias", + table: "DeploymentTemplateSelections", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true) + .Annotation("Relational:ColumnOrder", 5) + .OldAnnotation("Relational:ColumnOrder", 6); + + migrationBuilder.AlterColumn( + name: "Status", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 4) + .OldAnnotation("Relational:ColumnOrder", 6); + + migrationBuilder.AlterColumn( + name: "JSONData", + table: "DeploymentExecutions", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)") + .Annotation("Relational:ColumnOrder", 5) + .OldAnnotation("Relational:ColumnOrder", 7); + } + } +} diff --git a/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.Designer.cs b/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.Designer.cs new file mode 100644 index 0000000..1690f55 --- /dev/null +++ b/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.Designer.cs @@ -0,0 +1,3481 @@ +// +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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.cs b/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.cs new file mode 100644 index 0000000..9f00178 --- /dev/null +++ b/Migrations/20260709091610_SeedCredentialSecretsAndDeploymentArtifacts.cs @@ -0,0 +1,68 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class SeedCredentialSecretsAndDeploymentArtifacts : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.InsertData( + table: "CredentialSecrets", + columns: new[] { "Id", "Created", "CreatedBy", "IsEnabled", "MetadataJson", "Modified", "ModifiedBy", "Name", "SecretType", "SecretValue", "UserName" }, + values: new object[,] + { + { new Guid("90000000-0000-0000-0000-000000000001"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, "{\"environment\":\"Demo\",\"plaintext\":true}", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Windows/SharePoint/SetupAccount", "Credential", "DemoOnly-DoNotUseInProduction!", "CONTOSO\\svc_sp_setup" }, + { new Guid("90000000-0000-0000-0000-000000000002"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, "{\"environment\":\"Demo\",\"plaintext\":true}", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Windows/SharePoint/FarmAccount", "Credential", "DemoOnly-DoNotUseInProduction!", "CONTOSO\\svc_sp_farm" }, + { new Guid("90000000-0000-0000-0000-000000000003"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, "{\"environment\":\"Demo\",\"plaintext\":true}", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Windows/SharePoint/FarmPassphrase", "Secret", "DemoOnly-DoNotUseInProduction!", null }, + { new Guid("90000000-0000-0000-0000-000000000004"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, "{\"environment\":\"Demo\",\"plaintext\":true}", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Windows/SharePoint/DefaultServiceAccount", "Credential", "DemoOnly-DoNotUseInProduction!", "CONTOSO\\svc_sp_service" }, + { new Guid("90000000-0000-0000-0000-000000000005"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", true, "{\"environment\":\"Demo\",\"plaintext\":true}", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Windows/SharePoint/SearchAccount", "Credential", "DemoOnly-DoNotUseInProduction!", "CONTOSO\\svc_sp_search" } + }); + + migrationBuilder.InsertData( + table: "DeploymentArtifacts", + columns: new[] { "Id", "ArtifactType", "Created", "CreatedBy", "DeploymentGroupId", "DeploymentJson", "DeploymentTargetId", "InputHash", "IsStale", "Modified", "ModifiedBy", "OutputHash", "ResolvedJson", "SourceJson", "SourceSnapshotJson", "StaleReasonJson", "Status", "TargetId" }, + values: new object[] { new Guid("85000000-0000-0000-0000-000000000101"), "ResolvedConfigurationData", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("80000000-0000-0000-0000-000000000101"), "{\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}", null, "F081B9BACB21534D9673317615B990CC3836D68416CD6C94E06045E524640020", false, new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "8A49E86D9D571FDE9FE243849A5399A73750798F165B0D9DCE1318B8561CEF01", "{\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}", "{\"source\":\"DemoData\",\"composition\":\"Test.Merge.ps1\"}", "{\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}", null, "Pending", null }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "CredentialSecrets", + keyColumn: "Id", + keyValue: new Guid("90000000-0000-0000-0000-000000000001")); + + migrationBuilder.DeleteData( + table: "CredentialSecrets", + keyColumn: "Id", + keyValue: new Guid("90000000-0000-0000-0000-000000000002")); + + migrationBuilder.DeleteData( + table: "CredentialSecrets", + keyColumn: "Id", + keyValue: new Guid("90000000-0000-0000-0000-000000000003")); + + migrationBuilder.DeleteData( + table: "CredentialSecrets", + keyColumn: "Id", + keyValue: new Guid("90000000-0000-0000-0000-000000000004")); + + migrationBuilder.DeleteData( + table: "CredentialSecrets", + keyColumn: "Id", + keyValue: new Guid("90000000-0000-0000-0000-000000000005")); + + migrationBuilder.DeleteData( + table: "DeploymentArtifacts", + keyColumn: "Id", + keyValue: new Guid("85000000-0000-0000-0000-000000000101")); + } + } +} diff --git a/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.Designer.cs b/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.Designer.cs new file mode 100644 index 0000000..d41f35d --- /dev/null +++ b/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.Designer.cs @@ -0,0 +1,4689 @@ +// +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("20260709094302_SeedConfigurationDefinitionsAndValues")] + partial class SeedConfigurationDefinitionsAndValues + { + /// + 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"); + }); + + b.HasData( + new + { + Id = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "NetBIOSName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultSiteName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "InstanceName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDatabase", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmAccount", + PropertiesJson = "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminContentDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CallingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "MeetingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Landscape", + PropertiesJson = "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainFQDN", + PropertiesJson = "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainLabel", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainNetBIOS", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseServerName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefaultAccount", + PropertiesJson = "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmPassphrase", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseInstanceName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseTcpPort", + PropertiesJson = "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ProductKey", + PropertiesJson = "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SetupCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SearchServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CentralAdminPort", + PropertiesJson = "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolSearch", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), + ConfigurationDefinitionId = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), + ConfigurationDefinitionId = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), + ConfigurationDefinitionId = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", + ValueJson = "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("57913480-45b6-f13d-504d-b05d239a2366"), + ConfigurationDefinitionId = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), + ConfigurationDefinitionId = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("9550114f-755b-9512-b430-603954351fed"), + ConfigurationDefinitionId = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), + ConfigurationDefinitionId = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), + ConfigurationDefinitionId = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), + ConfigurationDefinitionId = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), + ConfigurationDefinitionId = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), + ConfigurationDefinitionId = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), + ConfigurationDefinitionId = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), + ConfigurationDefinitionId = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", + ValueJson = "{\"value\":\"Test\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), + ConfigurationDefinitionId = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), + ConfigurationDefinitionId = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), + ConfigurationDefinitionId = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), + ConfigurationDefinitionId = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), + ConfigurationDefinitionId = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("834efeb6-4b29-efa5-9856-465663c13458"), + ConfigurationDefinitionId = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", + ValueJson = "{\"value\":\"contoso.local\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("534db414-821b-59d3-b082-3c57efff2bff"), + ConfigurationDefinitionId = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", + ValueJson = "{\"value\":\"Contoso\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), + ConfigurationDefinitionId = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", + ValueJson = "{\"value\":\"CONTOSO\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), + ConfigurationDefinitionId = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), + ConfigurationDefinitionId = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", + ValueJson = "{\"value\":\"Content\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), + ConfigurationDefinitionId = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", + ValueJson = "{\"value\":\"SharePoint Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), + ConfigurationDefinitionId = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", + ValueJson = "{\"value\":\"SharePoint Web Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), + ConfigurationDefinitionId = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", + ValueJson = "{\"value\":\"CL-SQL-01\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), + ConfigurationDefinitionId = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 60, + ValueHash = "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", + ValueJson = "{\"value\":\"SVC_SHP_WAP\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), + ConfigurationDefinitionId = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 70, + ValueHash = "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", + ValueJson = "{\"value\":\"Services\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), + ConfigurationDefinitionId = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 80, + ValueHash = "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), + ConfigurationDefinitionId = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 90, + ValueHash = "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", + ValueJson = "{\"value\":\"SQLServer\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), + ConfigurationDefinitionId = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 100, + ValueHash = "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", + ValueJson = "{\"value\":1433}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), + ConfigurationDefinitionId = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 110, + ValueHash = "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), + ConfigurationDefinitionId = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 120, + ValueHash = "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", + ValueJson = "{\"value\":\"0000-0000-0000-0000-0000\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), + ConfigurationDefinitionId = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 130, + ValueHash = "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), + ConfigurationDefinitionId = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 140, + ValueHash = "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", + ValueJson = "{\"value\":\"SharePoint\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), + ConfigurationDefinitionId = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 150, + ValueHash = "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), + ConfigurationDefinitionId = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 160, + ValueHash = "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", + ValueJson = "{\"value\":4000}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), + ConfigurationDefinitionId = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 170, + ValueHash = "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", + ValueJson = "{\"value\":\"SharePoint Search Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), + ConfigurationDefinitionId = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), + ConfigurationDefinitionId = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("d336f688-57f4-4df1-a992-27e775a48440"), + ConfigurationDefinitionId = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), + ConfigurationDefinitionId = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), + ConfigurationDefinitionId = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }); + }); + + 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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.cs b/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.cs new file mode 100644 index 0000000..26e8fc4 --- /dev/null +++ b/Migrations/20260709094302_SeedConfigurationDefinitionsAndValues.cs @@ -0,0 +1,551 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class SeedConfigurationDefinitionsAndValues : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.InsertData( + table: "ConfigurationDefinitions", + columns: new[] { "Id", "Created", "CreatedBy", "DefinitionHash", "Kind", "Modified", "ModifiedBy", "Name", "PropertiesJson", "TemplateRevisionId" }, + values: new object[,] + { + { new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ServiceDbPrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ContentDbPrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "SearchServiceApplicationPoolAccount", "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ConfigDbName", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "WebApplicationPoolDefault", "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabaseServerName", "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Landscape", "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "CentralAdminPort", "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ConfigDbName", "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", new Guid("72000000-0000-0000-0000-000000000003") }, + { new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "AdminDbName", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DefaultServiceApplicationPoolAccount", "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "AdminContentDbName", "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", new Guid("72000000-0000-0000-0000-000000000003") }, + { new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ContentDbPrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ServiceDbPrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabasePrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("64767ffc-812e-b48e-db29-f295a287258b"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "MeetingPolicyName", "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", new Guid("72000000-0000-0000-0000-000000000004") }, + { new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DomainName", "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", new Guid("72000000-0000-0000-0000-000000000001") }, + { new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DomainNetBIOS", "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000102") }, + { new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabasePrefix", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "InstanceName", "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", new Guid("72000000-0000-0000-0000-000000000002") }, + { new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ConfigDbName", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ServiceApplicationPoolDefault", "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DomainFQDN", "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000102") }, + { new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ServiceDatabaseSegment", "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "FarmAccount", "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", new Guid("72000000-0000-0000-0000-000000000003") }, + { new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "NetBIOSName", "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", new Guid("72000000-0000-0000-0000-000000000001") }, + { new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "CallingPolicyName", "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", new Guid("72000000-0000-0000-0000-000000000004") }, + { new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "WebApplicationPoolDefaultAccount", "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabaseInstanceName", "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "AdminDbName", "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", new Guid("72000000-0000-0000-0000-000000000101") }, + { new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ConfigDatabase", "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", new Guid("72000000-0000-0000-0000-000000000002") }, + { new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ProductKey", "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ContentDatabaseSegment", "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabasePrefix", "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabasePrefix", "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", new Guid("72000000-0000-0000-0000-000000000003") }, + { new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", "Variable", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DefaultSiteName", "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", new Guid("72000000-0000-0000-0000-000000000001") }, + { new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabaseTcpPort", "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "FarmPassphrase", "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DomainLabel", "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", new Guid("72000000-0000-0000-0000-000000000102") }, + { new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "SetupCredential", "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "DatabasePrefix", "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", new Guid("72000000-0000-0000-0000-000000000002") }, + { new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "FarmCredential", "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", new Guid("72000000-0000-0000-0000-000000000103") }, + { new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", "Parameter", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "ServiceApplicationPoolSearch", "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", new Guid("72000000-0000-0000-0000-000000000103") } + }); + + migrationBuilder.InsertData( + table: "ConfigurationValues", + columns: new[] { "Id", "ConfigurationDefinitionId", "Created", "CreatedBy", "Modified", "ModifiedBy", "ScopeId", "ScopeType", "SortOrder", "SourcePath", "ValueHash", "ValueJson", "ValueSourceType" }, + values: new object[,] + { + { new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 50, null, "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", "Expression" }, + { new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000003"), "TemplateRevision", 10, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 130, null, "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", "SecretReference" }, + { new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 70, null, "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", "{\"value\":\"Services\"}", "Static" }, + { new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 100, null, "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", "{\"value\":1433}", "Static" }, + { new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 10, null, "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", "Expression" }, + { new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000004"), "TemplateRevision", 10, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000102"), "TemplateRevision", 30, null, "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", "{\"value\":\"CONTOSO\"}", "Static" }, + { new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000001"), "TemplateRevision", 10, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 10, null, "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", "Expression" }, + { new Guid("534db414-821b-59d3-b082-3c57efff2bff"), new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000102"), "TemplateRevision", 20, null, "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", "{\"value\":\"Contoso\"}", "Static" }, + { new Guid("57913480-45b6-f13d-504d-b05d239a2366"), new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000002"), "TemplateRevision", 10, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000002"), "TemplateRevision", 20, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 80, null, "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", "SecretReference" }, + { new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 150, null, "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", "SecretReference" }, + { new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 160, null, "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", "{\"value\":4000}", "Static" }, + { new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), new Guid("64767ffc-812e-b48e-db29-f295a287258b"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000004"), "TemplateRevision", 20, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 40, null, "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", "Expression" }, + { new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000003"), "TemplateRevision", 20, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 20, null, "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", "{\"value\":\"Content\"}", "Static" }, + { new Guid("834efeb6-4b29-efa5-9856-465663c13458"), new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000102"), "TemplateRevision", 10, null, "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", "{\"value\":\"contoso.local\"}", "Static" }, + { new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 30, null, "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", "{\"value\":\"SharePoint Service Applications\"}", "Static" }, + { new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 170, null, "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", "{\"value\":\"SharePoint Search Service Applications\"}", "Static" }, + { new Guid("9550114f-755b-9512-b430-603954351fed"), new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000002"), "TemplateRevision", 10, null, "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", "Expression" }, + { new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 40, null, "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", "{\"value\":\"SharePoint Web Applications\"}", "Static" }, + { new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 110, null, "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", "SecretReference" }, + { new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 50, null, "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", "Expression" }, + { new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 140, null, "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", "{\"value\":\"SharePoint\"}", "Static" }, + { new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 50, null, "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", "{\"value\":\"CL-SQL-01\"}", "Static" }, + { new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000001"), "TemplateRevision", 20, null, "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", "{}", "Static" }, + { new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 30, null, "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", "Expression" }, + { new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 20, null, "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", "Expression" }, + { new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 120, null, "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", "{\"value\":\"0000-0000-0000-0000-0000\"}", "Static" }, + { new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 60, null, "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", "{\"value\":\"SVC_SHP_WAP\"}", "Static" }, + { new Guid("d336f688-57f4-4df1-a992-27e775a48440"), new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 30, null, "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", "Expression" }, + { new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 10, null, "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", "SecretReference" }, + { new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000003"), "TemplateRevision", 10, null, "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", "Expression" }, + { new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 90, null, "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", "{\"value\":\"SQLServer\"}", "Static" }, + { new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000003"), "TemplateRevision", 20, null, "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", "Expression" }, + { new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000101"), "TemplateRevision", 10, null, "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", "{\"value\":\"Test\"}", "Static" }, + { new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000001"), "TemplateRevision", 10, null, "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", "Expression" }, + { new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 20, null, "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", "Expression" }, + { new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", new Guid("72000000-0000-0000-0000-000000000103"), "TemplateRevision", 40, null, "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", "Expression" } + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("49c62e61-ae10-259f-188c-618cd50e22a4")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("534db414-821b-59d3-b082-3c57efff2bff")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("57913480-45b6-f13d-504d-b05d239a2366")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("67204f36-a09b-233d-c022-9b4c713f40e1")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("680f4dac-c18b-0646-f036-478caf967a7a")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("834efeb6-4b29-efa5-9856-465663c13458")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("9550114f-755b-9512-b430-603954351fed")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("bfc73c02-2df3-916e-7f54-f432bab37613")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("cd120ede-010a-7433-d59c-13f90301b9e2")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("d336f688-57f4-4df1-a992-27e775a48440")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("d746cb22-0a95-7464-d693-aa5af56ae901")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57")); + + migrationBuilder.DeleteData( + table: "ConfigurationValues", + keyColumn: "Id", + keyValue: new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("04091788-4a0a-7911-b11d-b70335ad378a")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("07333ab1-de72-442d-d91a-0bb2dd969443")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("50f73169-1bda-2644-6963-b7cfad914a6a")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("64767ffc-812e-b48e-db29-f295a287258b")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("67ca0430-31c6-553d-1553-60401cf4015c")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("73be057e-cd31-1658-186b-bcf4695a48f7")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("c32f0de1-59a8-ffb2-a421-92209185de89")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32")); + + migrationBuilder.DeleteData( + table: "ConfigurationDefinitions", + keyColumn: "Id", + keyValue: new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108")); + } + } +} diff --git a/Migrations/20260709102045_AddOnPremApiClients.Designer.cs b/Migrations/20260709102045_AddOnPremApiClients.Designer.cs new file mode 100644 index 0000000..0291516 --- /dev/null +++ b/Migrations/20260709102045_AddOnPremApiClients.Designer.cs @@ -0,0 +1,4778 @@ +// +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("20260709102045_AddOnPremApiClients")] + partial class AddOnPremApiClients + { + /// + 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.ApiClientModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnOrder(1); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(6); + + b.Property("IsEnabled") + .HasColumnType("bit") + .HasColumnOrder(5); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .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(2); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + b.Property("SecretHash") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("ApiClients", t => + { + t.HasCheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("91000000-0000-0000-0000-000000000001"), + ClientId = "ssp-demo-worker", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsEnabled = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Demo Worker Client", + ScopesJson = "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\"]", + SecretHash = "PBKDF2-SHA256.100000.c3NwLWRlbW8td29ya2VyAA==.xQxe7BHCn9pdkqHozdyspEmKnz95uCUuxVvU2vgCEbo=" + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "NetBIOSName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultSiteName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "InstanceName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDatabase", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmAccount", + PropertiesJson = "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminContentDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CallingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "MeetingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Landscape", + PropertiesJson = "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainFQDN", + PropertiesJson = "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainLabel", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainNetBIOS", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseServerName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefaultAccount", + PropertiesJson = "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmPassphrase", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseInstanceName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseTcpPort", + PropertiesJson = "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ProductKey", + PropertiesJson = "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SetupCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SearchServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CentralAdminPort", + PropertiesJson = "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolSearch", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), + ConfigurationDefinitionId = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), + ConfigurationDefinitionId = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), + ConfigurationDefinitionId = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", + ValueJson = "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("57913480-45b6-f13d-504d-b05d239a2366"), + ConfigurationDefinitionId = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), + ConfigurationDefinitionId = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("9550114f-755b-9512-b430-603954351fed"), + ConfigurationDefinitionId = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), + ConfigurationDefinitionId = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), + ConfigurationDefinitionId = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), + ConfigurationDefinitionId = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), + ConfigurationDefinitionId = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), + ConfigurationDefinitionId = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), + ConfigurationDefinitionId = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), + ConfigurationDefinitionId = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", + ValueJson = "{\"value\":\"Test\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), + ConfigurationDefinitionId = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), + ConfigurationDefinitionId = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), + ConfigurationDefinitionId = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), + ConfigurationDefinitionId = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), + ConfigurationDefinitionId = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("834efeb6-4b29-efa5-9856-465663c13458"), + ConfigurationDefinitionId = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", + ValueJson = "{\"value\":\"contoso.local\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("534db414-821b-59d3-b082-3c57efff2bff"), + ConfigurationDefinitionId = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", + ValueJson = "{\"value\":\"Contoso\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), + ConfigurationDefinitionId = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", + ValueJson = "{\"value\":\"CONTOSO\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), + ConfigurationDefinitionId = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), + ConfigurationDefinitionId = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", + ValueJson = "{\"value\":\"Content\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), + ConfigurationDefinitionId = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", + ValueJson = "{\"value\":\"SharePoint Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), + ConfigurationDefinitionId = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", + ValueJson = "{\"value\":\"SharePoint Web Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), + ConfigurationDefinitionId = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", + ValueJson = "{\"value\":\"CL-SQL-01\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), + ConfigurationDefinitionId = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 60, + ValueHash = "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", + ValueJson = "{\"value\":\"SVC_SHP_WAP\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), + ConfigurationDefinitionId = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 70, + ValueHash = "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", + ValueJson = "{\"value\":\"Services\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), + ConfigurationDefinitionId = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 80, + ValueHash = "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), + ConfigurationDefinitionId = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 90, + ValueHash = "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", + ValueJson = "{\"value\":\"SQLServer\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), + ConfigurationDefinitionId = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 100, + ValueHash = "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", + ValueJson = "{\"value\":1433}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), + ConfigurationDefinitionId = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 110, + ValueHash = "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), + ConfigurationDefinitionId = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 120, + ValueHash = "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", + ValueJson = "{\"value\":\"0000-0000-0000-0000-0000\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), + ConfigurationDefinitionId = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 130, + ValueHash = "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), + ConfigurationDefinitionId = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 140, + ValueHash = "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", + ValueJson = "{\"value\":\"SharePoint\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), + ConfigurationDefinitionId = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 150, + ValueHash = "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), + ConfigurationDefinitionId = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 160, + ValueHash = "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", + ValueJson = "{\"value\":4000}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), + ConfigurationDefinitionId = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 170, + ValueHash = "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", + ValueJson = "{\"value\":\"SharePoint Search Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), + ConfigurationDefinitionId = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), + ConfigurationDefinitionId = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("d336f688-57f4-4df1-a992-27e775a48440"), + ConfigurationDefinitionId = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), + ConfigurationDefinitionId = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), + ConfigurationDefinitionId = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }); + }); + + 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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709102045_AddOnPremApiClients.cs b/Migrations/20260709102045_AddOnPremApiClients.cs new file mode 100644 index 0000000..1c98e9d --- /dev/null +++ b/Migrations/20260709102045_AddOnPremApiClients.cs @@ -0,0 +1,56 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class AddOnPremApiClients : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ApiClients", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + ClientId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: false), + SecretHash = table.Column(type: "nvarchar(max)", nullable: false), + ScopesJson = table.Column(type: "nvarchar(max)", nullable: false), + IsEnabled = table.Column(type: "bit", nullable: false), + ExpiresAt = table.Column(type: "datetime2", nullable: true), + LastUsedAt = table.Column(type: "datetime2", nullable: true), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiClients", x => x.Id); + table.CheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + + migrationBuilder.InsertData( + table: "ApiClients", + columns: new[] { "Id", "ClientId", "Created", "CreatedBy", "ExpiresAt", "IsEnabled", "LastUsedAt", "Modified", "ModifiedBy", "Name", "ScopesJson", "SecretHash" }, + values: new object[] { new Guid("91000000-0000-0000-0000-000000000001"), "ssp-demo-worker", new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", null, true, null, new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), "DemoSeed", "Demo Worker Client", "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\"]", "PBKDF2-SHA256.100000.c3NwLWRlbW8td29ya2VyAA==.xQxe7BHCn9pdkqHozdyspEmKnz95uCUuxVvU2vgCEbo=" }); + + migrationBuilder.CreateIndex( + name: "IX_ApiClients_ClientId", + table: "ApiClients", + column: "ClientId", + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ApiClients"); + } + } +} diff --git a/Migrations/20260709110427_AddApiTokenManagement.Designer.cs b/Migrations/20260709110427_AddApiTokenManagement.Designer.cs new file mode 100644 index 0000000..96476f6 --- /dev/null +++ b/Migrations/20260709110427_AddApiTokenManagement.Designer.cs @@ -0,0 +1,4884 @@ +// +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("20260709110427_AddApiTokenManagement")] + partial class AddApiTokenManagement + { + /// + 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.ApiClientModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnOrder(1); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(6); + + b.Property("IsEnabled") + .HasColumnType("bit") + .HasColumnOrder(5); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .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(2); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + b.Property("SecretHash") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("ApiClients", t => + { + t.HasCheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("91000000-0000-0000-0000-000000000001"), + ClientId = "ssp-demo-worker", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsEnabled = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Demo Worker Client", + ScopesJson = "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\"]", + SecretHash = "PBKDF2-SHA256.100000.c3NwLWRlbW8td29ya2VyAA==.xQxe7BHCn9pdkqHozdyspEmKnz95uCUuxVvU2vgCEbo=" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ApiClientId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(4); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("IssuedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("Jti") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(1); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .HasColumnOrder(11); + + 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(5); + + b.Property("RevokedAt") + .HasColumnType("datetime2") + .HasColumnOrder(9); + + b.Property("RevokedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(10); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(6); + + b.Property("Subject") + .IsRequired() + .HasColumnType("nvarchar(450)") + .HasColumnOrder(2); + + b.Property("SubjectType") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ApiClientId"); + + b.HasIndex("Jti") + .IsUnique(); + + b.HasIndex("SubjectType", "Subject"); + + b.ToTable("ApiTokens", t => + { + t.HasCheckConstraint("CK_ApiTokens_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "NetBIOSName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultSiteName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "InstanceName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDatabase", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmAccount", + PropertiesJson = "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminContentDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CallingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "MeetingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Landscape", + PropertiesJson = "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainFQDN", + PropertiesJson = "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainLabel", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainNetBIOS", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseServerName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefaultAccount", + PropertiesJson = "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmPassphrase", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseInstanceName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseTcpPort", + PropertiesJson = "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ProductKey", + PropertiesJson = "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SetupCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SearchServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CentralAdminPort", + PropertiesJson = "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolSearch", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), + ConfigurationDefinitionId = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), + ConfigurationDefinitionId = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), + ConfigurationDefinitionId = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", + ValueJson = "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("57913480-45b6-f13d-504d-b05d239a2366"), + ConfigurationDefinitionId = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), + ConfigurationDefinitionId = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("9550114f-755b-9512-b430-603954351fed"), + ConfigurationDefinitionId = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), + ConfigurationDefinitionId = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), + ConfigurationDefinitionId = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), + ConfigurationDefinitionId = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), + ConfigurationDefinitionId = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), + ConfigurationDefinitionId = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), + ConfigurationDefinitionId = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), + ConfigurationDefinitionId = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", + ValueJson = "{\"value\":\"Test\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), + ConfigurationDefinitionId = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), + ConfigurationDefinitionId = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), + ConfigurationDefinitionId = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), + ConfigurationDefinitionId = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), + ConfigurationDefinitionId = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("834efeb6-4b29-efa5-9856-465663c13458"), + ConfigurationDefinitionId = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", + ValueJson = "{\"value\":\"contoso.local\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("534db414-821b-59d3-b082-3c57efff2bff"), + ConfigurationDefinitionId = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", + ValueJson = "{\"value\":\"Contoso\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), + ConfigurationDefinitionId = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", + ValueJson = "{\"value\":\"CONTOSO\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), + ConfigurationDefinitionId = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), + ConfigurationDefinitionId = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", + ValueJson = "{\"value\":\"Content\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), + ConfigurationDefinitionId = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", + ValueJson = "{\"value\":\"SharePoint Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), + ConfigurationDefinitionId = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", + ValueJson = "{\"value\":\"SharePoint Web Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), + ConfigurationDefinitionId = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", + ValueJson = "{\"value\":\"CL-SQL-01\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), + ConfigurationDefinitionId = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 60, + ValueHash = "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", + ValueJson = "{\"value\":\"SVC_SHP_WAP\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), + ConfigurationDefinitionId = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 70, + ValueHash = "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", + ValueJson = "{\"value\":\"Services\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), + ConfigurationDefinitionId = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 80, + ValueHash = "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), + ConfigurationDefinitionId = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 90, + ValueHash = "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", + ValueJson = "{\"value\":\"SQLServer\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), + ConfigurationDefinitionId = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 100, + ValueHash = "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", + ValueJson = "{\"value\":1433}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), + ConfigurationDefinitionId = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 110, + ValueHash = "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), + ConfigurationDefinitionId = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 120, + ValueHash = "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", + ValueJson = "{\"value\":\"0000-0000-0000-0000-0000\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), + ConfigurationDefinitionId = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 130, + ValueHash = "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), + ConfigurationDefinitionId = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 140, + ValueHash = "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", + ValueJson = "{\"value\":\"SharePoint\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), + ConfigurationDefinitionId = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 150, + ValueHash = "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), + ConfigurationDefinitionId = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 160, + ValueHash = "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", + ValueJson = "{\"value\":4000}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), + ConfigurationDefinitionId = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 170, + ValueHash = "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", + ValueJson = "{\"value\":\"SharePoint Search Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), + ConfigurationDefinitionId = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), + ConfigurationDefinitionId = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("d336f688-57f4-4df1-a992-27e775a48440"), + ConfigurationDefinitionId = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), + ConfigurationDefinitionId = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), + ConfigurationDefinitionId = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }); + }); + + 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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ApiClientModel", "ApiClient") + .WithMany() + .HasForeignKey("ApiClientId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ApiClient"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709110427_AddApiTokenManagement.cs b/Migrations/20260709110427_AddApiTokenManagement.cs new file mode 100644 index 0000000..ebebb53 --- /dev/null +++ b/Migrations/20260709110427_AddApiTokenManagement.cs @@ -0,0 +1,71 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class AddApiTokenManagement : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ApiTokens", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false, defaultValueSql: "NEWID()"), + Jti = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Subject = table.Column(type: "nvarchar(450)", nullable: false), + SubjectType = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + ApiClientId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(max)", nullable: false), + ScopesJson = table.Column(type: "nvarchar(max)", nullable: false), + IssuedAt = table.Column(type: "datetime2", nullable: false), + ExpiresAt = table.Column(type: "datetime2", nullable: false), + RevokedAt = table.Column(type: "datetime2", nullable: true), + RevokedBy = table.Column(type: "nvarchar(max)", nullable: true), + LastUsedAt = table.Column(type: "datetime2", nullable: true), + Modified = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + ModifiedBy = table.Column(type: "nvarchar(max)", nullable: false), + Created = table.Column(type: "datetime2", nullable: false, defaultValueSql: "GETDATE()"), + CreatedBy = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ApiTokens", x => x.Id); + table.CheckConstraint("CK_ApiTokens_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + table.ForeignKey( + name: "FK_ApiTokens_ApiClients_ApiClientId", + column: x => x.ApiClientId, + principalTable: "ApiClients", + principalColumn: "Id", + onDelete: ReferentialAction.SetNull); + }); + + migrationBuilder.CreateIndex( + name: "IX_ApiTokens_ApiClientId", + table: "ApiTokens", + column: "ApiClientId"); + + migrationBuilder.CreateIndex( + name: "IX_ApiTokens_Jti", + table: "ApiTokens", + column: "Jti", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_ApiTokens_SubjectType_Subject", + table: "ApiTokens", + columns: new[] { "SubjectType", "Subject" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ApiTokens"); + } + } +} diff --git a/Migrations/20260709110540_AddDemoApiClientTokenScopes.Designer.cs b/Migrations/20260709110540_AddDemoApiClientTokenScopes.Designer.cs new file mode 100644 index 0000000..79225ca --- /dev/null +++ b/Migrations/20260709110540_AddDemoApiClientTokenScopes.Designer.cs @@ -0,0 +1,4884 @@ +// +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("20260709110540_AddDemoApiClientTokenScopes")] + partial class AddDemoApiClientTokenScopes + { + /// + 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.ApiClientModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnOrder(1); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(6); + + b.Property("IsEnabled") + .HasColumnType("bit") + .HasColumnOrder(5); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .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(2); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + b.Property("SecretHash") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("ApiClients", t => + { + t.HasCheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("91000000-0000-0000-0000-000000000001"), + ClientId = "ssp-demo-worker", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsEnabled = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Demo Worker Client", + ScopesJson = "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\",\"token.manage\",\"token.admin\"]", + SecretHash = "PBKDF2-SHA256.100000.c3NwLWRlbW8td29ya2VyAA==.xQxe7BHCn9pdkqHozdyspEmKnz95uCUuxVvU2vgCEbo=" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ApiClientId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(4); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("IssuedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("Jti") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(1); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .HasColumnOrder(11); + + 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(5); + + b.Property("RevokedAt") + .HasColumnType("datetime2") + .HasColumnOrder(9); + + b.Property("RevokedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(10); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(6); + + b.Property("Subject") + .IsRequired() + .HasColumnType("nvarchar(450)") + .HasColumnOrder(2); + + b.Property("SubjectType") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ApiClientId"); + + b.HasIndex("Jti") + .IsUnique(); + + b.HasIndex("SubjectType", "Subject"); + + b.ToTable("ApiTokens", t => + { + t.HasCheckConstraint("CK_ApiTokens_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "NetBIOSName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultSiteName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "InstanceName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDatabase", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmAccount", + PropertiesJson = "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminContentDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CallingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "MeetingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Landscape", + PropertiesJson = "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainFQDN", + PropertiesJson = "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainLabel", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainNetBIOS", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseServerName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefaultAccount", + PropertiesJson = "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmPassphrase", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseInstanceName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseTcpPort", + PropertiesJson = "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ProductKey", + PropertiesJson = "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SetupCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SearchServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CentralAdminPort", + PropertiesJson = "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolSearch", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), + ConfigurationDefinitionId = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), + ConfigurationDefinitionId = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), + ConfigurationDefinitionId = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", + ValueJson = "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("57913480-45b6-f13d-504d-b05d239a2366"), + ConfigurationDefinitionId = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), + ConfigurationDefinitionId = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("9550114f-755b-9512-b430-603954351fed"), + ConfigurationDefinitionId = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), + ConfigurationDefinitionId = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), + ConfigurationDefinitionId = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), + ConfigurationDefinitionId = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), + ConfigurationDefinitionId = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), + ConfigurationDefinitionId = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), + ConfigurationDefinitionId = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), + ConfigurationDefinitionId = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", + ValueJson = "{\"value\":\"Test\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), + ConfigurationDefinitionId = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), + ConfigurationDefinitionId = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), + ConfigurationDefinitionId = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), + ConfigurationDefinitionId = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), + ConfigurationDefinitionId = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("834efeb6-4b29-efa5-9856-465663c13458"), + ConfigurationDefinitionId = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", + ValueJson = "{\"value\":\"contoso.local\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("534db414-821b-59d3-b082-3c57efff2bff"), + ConfigurationDefinitionId = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", + ValueJson = "{\"value\":\"Contoso\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), + ConfigurationDefinitionId = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", + ValueJson = "{\"value\":\"CONTOSO\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), + ConfigurationDefinitionId = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), + ConfigurationDefinitionId = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", + ValueJson = "{\"value\":\"Content\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), + ConfigurationDefinitionId = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", + ValueJson = "{\"value\":\"SharePoint Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), + ConfigurationDefinitionId = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", + ValueJson = "{\"value\":\"SharePoint Web Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), + ConfigurationDefinitionId = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", + ValueJson = "{\"value\":\"CL-SQL-01\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), + ConfigurationDefinitionId = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 60, + ValueHash = "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", + ValueJson = "{\"value\":\"SVC_SHP_WAP\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), + ConfigurationDefinitionId = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 70, + ValueHash = "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", + ValueJson = "{\"value\":\"Services\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), + ConfigurationDefinitionId = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 80, + ValueHash = "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), + ConfigurationDefinitionId = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 90, + ValueHash = "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", + ValueJson = "{\"value\":\"SQLServer\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), + ConfigurationDefinitionId = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 100, + ValueHash = "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", + ValueJson = "{\"value\":1433}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), + ConfigurationDefinitionId = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 110, + ValueHash = "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), + ConfigurationDefinitionId = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 120, + ValueHash = "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", + ValueJson = "{\"value\":\"0000-0000-0000-0000-0000\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), + ConfigurationDefinitionId = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 130, + ValueHash = "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), + ConfigurationDefinitionId = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 140, + ValueHash = "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", + ValueJson = "{\"value\":\"SharePoint\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), + ConfigurationDefinitionId = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 150, + ValueHash = "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), + ConfigurationDefinitionId = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 160, + ValueHash = "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", + ValueJson = "{\"value\":4000}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), + ConfigurationDefinitionId = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 170, + ValueHash = "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", + ValueJson = "{\"value\":\"SharePoint Search Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), + ConfigurationDefinitionId = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), + ConfigurationDefinitionId = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("d336f688-57f4-4df1-a992-27e775a48440"), + ConfigurationDefinitionId = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), + ConfigurationDefinitionId = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), + ConfigurationDefinitionId = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }); + }); + + 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("Color") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(5); + + 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(3); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnOrder(4); + + 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("ServiceId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("ServiceId"); + + b.ToTable("TemplateCategories"); + + b.HasData( + new + { + Id = new Guid("50000000-0000-0000-0000-000000000001"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for domain controller and domain configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Domain Services", + ServiceId = new Guid("40000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000002"), + Color = "#16A34A", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SQL Server workloads.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Database Platform", + ServiceId = new Guid("40000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000003"), + Color = "#0F766E", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for SharePoint Server farms.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Collaboration Farm", + ServiceId = new Guid("40000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000004"), + Color = "#7C3AED", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Templates for Teams policy configuration.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Teams Policies", + ServiceId = new Guid("40000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("50000000-0000-0000-0000-000000000101"), + Color = "#2563EB", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + Description = "Materialized template building blocks from the BGW Test.Merge.ps1 scenario.", + IsActive = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Test.Merge.ps1 Templates", + ServiceId = new Guid("40000000-0000-0000-0000-000000000101") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", 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(6); + + b.Property("Description") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JSONData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + 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("TemplateCategoryId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + + b.Property("Version") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("DeploymentRuleId"); + + b.HasIndex("TemplateCategoryId"); + + b.ToTable("Templates"); + + b.HasData( + new + { + Id = new Guid("70000000-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"), + Description = "Creates a reusable Active Directory domain baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Active Directory Domain", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SQL Server baseline for application workloads.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SQL Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a SharePoint Server farm baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso SharePoint Server", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Creates a Microsoft Teams policy baseline.", + JSONData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Contoso Teams Policies", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Environment/Test.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Environment Test", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Domain/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Domain Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-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"), + Description = "Materialized Service/SharePoint/Contoso.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW SharePoint Contoso", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("70000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DeploymentRuleId = new Guid("60000000-0000-0000-0000-000000000001"), + Description = "Materialized Stage/Install.psd1 template from Test.Merge.ps1.", + JSONData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "BGW Stage Install", + TemplateCategoryId = new Guid("50000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.Property("OptionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0); + + 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.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(2); + + b.HasKey("OptionId", "TemplateId"); + + b.HasIndex("TemplateId"); + + b.ToTable("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", 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("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(8); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(2); + + b.HasKey("Id"); + + b.HasIndex("TemplateId") + .IsUnique() + .HasFilter("[IsPublished] = 1"); + + b.HasIndex("TemplateId", "Version") + .IsUnique(); + + b.ToTable("TemplateVersions", t => + { + t.HasCheckConstraint("CK_TemplateVersions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("71000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000001"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000002"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000003"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000004"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000101"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000102"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000103"), + Version = "1.0.0" + }, + new + { + Id = new Guid("71000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + SchemaVersion = "1.0", + TemplateId = new Guid("70000000-0000-0000-0000-000000000104"), + Version = "1.0.0" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ApiClientModel", "ApiClient") + .WithMany() + .HasForeignKey("ApiClientId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ApiClient"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("DeploymentGroups") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Deployments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany("Deployments") + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("ParameterValues") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", "DeploymentTemplateSelection") + .WithMany() + .HasForeignKey("DeploymentTemplateSelectionId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("DeploymentGroup"); + + b.Navigation("DeploymentTemplateSelection"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany("Steps") + .HasForeignKey("DeploymentRuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTargetAssignmentModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TargetAssignments") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentTemplateSelectionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("TemplateSelections") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany() + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DeploymentGroup"); + + b.Navigation("TemplateRevision"); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentDomainsModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("EnvironmentDomains") + .HasForeignKey("DomainId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", "Environment") + .WithMany("EnvironmentDomains") + .HasForeignKey("EnvironmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Domain"); + + b.Navigation("Environment"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", "OptionCategory") + .WithMany("Options") + .HasForeignKey("OptionCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OptionCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobStepModel", "DependsOnQueueJobStep") + .WithMany() + .HasForeignKey("DependsOnQueueJobStepId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Steps") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DependsOnQueueJobStep"); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobTargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", "QueueJob") + .WithMany("Targets") + .HasForeignKey("QueueJobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("QueueJob"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceRoleDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("RoleDefinitions") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", "Domain") + .WithMany("Targets") + .HasForeignKey("DomainID"); + + b.Navigation("Domain"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", "Service") + .WithMany("TemplateCategories") + .HasForeignKey("ServiceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Service"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") + .WithMany() + .HasForeignKey("DeploymentRuleId"); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", "TemplateCategory") + .WithMany("Templates") + .HasForeignKey("TemplateCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeploymentRule"); + + b.Navigation("TemplateCategory"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateOptionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", "Option") + .WithMany("TemplateOptions") + .HasForeignKey("OptionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateOptions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Option"); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") + .WithMany("TemplateVersions") + .HasForeignKey("TemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => + { + b.Navigation("Artifacts"); + + b.Navigation("Deployments"); + + b.Navigation("ParameterValues"); + + b.Navigation("TargetAssignments"); + + b.Navigation("TemplateSelections"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => + { + b.Navigation("Steps"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DomainModel", b => + { + b.Navigation("EnvironmentDomains"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.EnvironmentModel", b => + { + b.Navigation("EnvironmentDomains"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionCategoryModel", b => + { + b.Navigation("Options"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.OptionModel", b => + { + b.Navigation("TemplateOptions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.QueueJobModel", b => + { + b.Navigation("Steps"); + + b.Navigation("Targets"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ServiceModel", b => + { + b.Navigation("RoleDefinitions"); + + b.Navigation("TemplateCategories"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", b => + { + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateCategoryModel", b => + { + b.Navigation("Templates"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", b => + { + b.Navigation("DeploymentGroups"); + + b.Navigation("TemplateOptions"); + + b.Navigation("TemplateVersions"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Migrations/20260709110540_AddDemoApiClientTokenScopes.cs b/Migrations/20260709110540_AddDemoApiClientTokenScopes.cs new file mode 100644 index 0000000..0ed1865 --- /dev/null +++ b/Migrations/20260709110540_AddDemoApiClientTokenScopes.cs @@ -0,0 +1,33 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Microsoft.SelfService.Portal.Core.API.Migrations +{ + /// + public partial class AddDemoApiClientTokenScopes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "ApiClients", + keyColumn: "Id", + keyValue: new Guid("91000000-0000-0000-0000-000000000001"), + column: "ScopesJson", + value: "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\",\"token.manage\",\"token.admin\"]"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "ApiClients", + keyColumn: "Id", + keyValue: new Guid("91000000-0000-0000-0000-000000000001"), + column: "ScopesJson", + value: "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\"]"); + } + } +} diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index beb6808..9749d19 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -22,6 +22,1812 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiClientModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnOrder(1); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(6); + + b.Property("IsEnabled") + .HasColumnType("bit") + .HasColumnOrder(5); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .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(2); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(4); + + b.Property("SecretHash") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("ApiClients", t => + { + t.HasCheckConstraint("CK_ApiClients_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("91000000-0000-0000-0000-000000000001"), + ClientId = "ssp-demo-worker", + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsEnabled = true, + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Demo Worker Client", + ScopesJson = "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\",\"token.manage\",\"token.admin\"]", + SecretHash = "PBKDF2-SHA256.100000.c3NwLWRlbW8td29ya2VyAA==.xQxe7BHCn9pdkqHozdyspEmKnz95uCUuxVvU2vgCEbo=" + }); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier") + .HasColumnOrder(0) + .HasDefaultValueSql("NEWID()"); + + b.Property("ApiClientId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(4); + + b.Property("Created") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(52) + .HasDefaultValueSql("GETDATE()"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(53); + + b.Property("ExpiresAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("IssuedAt") + .HasColumnType("datetime2") + .HasColumnOrder(7); + + b.Property("Jti") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(1); + + b.Property("LastUsedAt") + .HasColumnType("datetime2") + .HasColumnOrder(11); + + 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(5); + + b.Property("RevokedAt") + .HasColumnType("datetime2") + .HasColumnOrder(9); + + b.Property("RevokedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(10); + + b.Property("ScopesJson") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(6); + + b.Property("Subject") + .IsRequired() + .HasColumnType("nvarchar(450)") + .HasColumnOrder(2); + + b.Property("SubjectType") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(3); + + b.HasKey("Id"); + + b.HasIndex("ApiClientId"); + + b.HasIndex("Jti") + .IsUnique(); + + b.HasIndex("SubjectType", "Subject"); + + b.ToTable("ApiTokens", t => + { + t.HasCheckConstraint("CK_ApiTokens_ScopesJson_IsJson", "ISJSON([ScopesJson]) = 1"); + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5A4F2C381DC5EBA68A416A739E7DCF0179EA6FF84D884BAF3A554D488DA9F5CE", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DB3469AE0FFB2D1669BD5E8B3078C3FA04FF8DB4FA67998C9610BE9C1C96FB53", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "NetBIOSName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DDC6599447376095A217761107BAB8795DBDB6CD0D7418A8B1A2E49684E1EFB8", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultSiteName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "112452BFA4BC12A22D96FE3095743046C3BDFBEB7DDC17E473BB2D54E6134AF6", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "InstanceName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "0975CC4EB86BE0F5D26FF2E44A7663ECDC550671F88270DE44E402AA36793609", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "E61970B4774DA1EABE34D93AE56C4647008872A0E01B9F1862D67B7049E02CDB", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDatabase", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B259744A1EB2E69B9D7B2A4BA1B0A9B1930AD837872C7D4F4ABDEEFA2F61A868", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "75224F964656A4CFD8BBB38F26767A098A327F35A986F0E63247B75B0CD0C834", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmAccount", + PropertiesJson = "{ \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8FF8AE6C17C434DEC71C889173C0AD3E1759B94F99C0ACAFECB657D3327708BA", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "00139B0DB8374A47087A5AE9114E53200D7B2FEF79163BC3E2D627159986141A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminContentDbName", + PropertiesJson = "{\"Expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8BAB062E6AAAE0E29902434B02DDFEC4A79908E307530CC3177F081F587317BD", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CallingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "5469237A902DBDD5D1D5365F83BC4369D466C6283B618D5EFFF18037B954D206", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "MeetingPolicyName", + PropertiesJson = "{ \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "48BB0B2F36F4CA5BA7A2326F64B19AFA55D58345E675540A806877A78F61F97D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "Landscape", + PropertiesJson = "{\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "FE5E0E49AA2D785B2ECA765C15A57889372826684A465793C1A69B528406D7AB", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainFQDN", + PropertiesJson = "{\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "ECF2FC72BEF5492B23764A1316ABEE9652F23D5C02A569A6FF59D35AAB4DE603", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainLabel", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "62DE452BEBAE7CC7332895F461CD648707B5434F1EC4D55FA01E6B10A0FC4F74", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DomainNetBIOS", + PropertiesJson = "{\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8EF099B36AF59BC20F3FBB9D9CBBFAC9F1E32D52521A890F9510216D862DCDA2", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "28AF3E6D01302114A9A83652445875D944E00AE5291CDC76F34BE5D412328B4D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "F45D71DEA1E2C611B54BD9077A92D438B2DBA2866781ABF397AFA20C2E985E07", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "8F7A22AEDBCA0CCC09451FBE6B969687E56042826C989B85CD3F02569837B761", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefault", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "BCDC01B9105DB0D42D6E8CD49092E10713CF4CBB42178218F5B2450CCB1A359A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseServerName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "21654CC3E82D2DE59E438E554C32F074BA88894F1F6825BC0154D6B127CDCDD8", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "WebApplicationPoolDefaultAccount", + PropertiesJson = "{\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "161F0B7F00446101C1C6CBFFAACC28EFE56418E7636DCCEC2C4EE57538ACC182", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDatabaseSegment", + PropertiesJson = "{\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "1E280B017D410A45BBF262CBED384ADA7AE42FB0D1390BDFF68909FD4389043A", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "FarmPassphrase", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "2BFD19F4E9E81007EBA8B7EDE220316E042FF6B1471CF1C33AD47E8FEE083121", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseInstanceName", + PropertiesJson = "{\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "DED3F6C00C32BA6888DEFA172C837415D118388478A160D872AEA098B38C9298", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabaseTcpPort", + PropertiesJson = "{\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "071CCD19384E43C652F0CF2E633702F12BBC1CE8A46472DCF1B7EBB9A500795E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DefaultServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "C16A8CDDCD81BAA020E26C1EC06AB229A4483E095A9259E1C471CC7322CCF011", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ProductKey", + PropertiesJson = "{\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4A1AAAAA8D012E87FDFCB9C7B45C490E35B4FDD1341A6D8682591E25DE782A1F", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SetupCredential", + PropertiesJson = "{\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4BE38B4AB1097AB42C79DA38FE0E6B6F4399319E22B23CCE5461BF7D1D1E586E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "16F0D197D56D4E12B3BEB98AEA78A9D9C16DB35C1B09F3FA2298620504820B73", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "SearchServiceApplicationPoolAccount", + PropertiesJson = "{\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "50EDDD3C7853B59491CA782C3A45A9E33EE6709FF4B964D6E42FB2DC4D6D546D", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "CentralAdminPort", + PropertiesJson = "{\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "3932CF99DA0C5583F34A16C94762F0EA1E94A2D197E4E56D5F2226863686577E", + Kind = "Parameter", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceApplicationPoolSearch", + PropertiesJson = "{\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "AB14380C5D597E9B70A8F42F768BF86A71118D86A8B9E28237B70952CE0BEBBD", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "AdminDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "81D3F97A03D7745EEB15174781144CD222A27E71F28A08F0C7F03496B74A0C87", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ContentDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "66CA01A01EE073BAD5B77E2ECC9F3CB54967A3F4AE820E317C24C35DB6AF5ED2", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ServiceDbPrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "4F3A9ED930F155C1D23ACD9FD640C0D2253B250467200E68020E1BA9FF25CA15", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "DatabasePrefix", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + DefinitionHash = "B020AA02247152F414B03ACFB1281A6A955D4F48CA3CB26A5B42EB3A3169113A", + Kind = "Variable", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + Name = "ConfigDbName", + PropertiesJson = "{\"Expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") + }); + }); + + 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"); + }); + + b.HasData( + new + { + Id = new Guid("4a2c7cf6-41f3-b20f-de61-6efaf96444f9"), + ConfigurationDefinitionId = new Guid("67ca0430-31c6-553d-1553-60401cf4015c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b21cf5c3-284f-eca7-cf39-dd7451002ea4"), + ConfigurationDefinitionId = new Guid("971fc778-2e79-6408-aec3-1beeaf7fce8e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("eb107c2a-335d-5148-aecf-33ffd3ba51bc"), + ConfigurationDefinitionId = new Guid("dc4af326-9a3d-c4a6-9462-669bcf16103a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000001"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "C02CA81E91040D74400B8E4D152614D790E8D741A993754383057E87A581AF09", + ValueJson = "{\"expression\":\"[concat(parameters('DomainName'), '-DefaultSite')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("57913480-45b6-f13d-504d-b05d239a2366"), + ConfigurationDefinitionId = new Guid("72fbe523-8aba-6aed-0918-d3e96f12254f"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("651d7a24-db44-f18e-2607-1da3a1afbd9c"), + ConfigurationDefinitionId = new Guid("eb2d6268-83d4-ecc7-1696-eff819ac5db5"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("9550114f-755b-9512-b430-603954351fed"), + ConfigurationDefinitionId = new Guid("afa8d0b4-7fc7-d419-7f01-6fb1fd59be4d"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000002"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "6ED96528075B87998FDAF609CB1E2A95224A347D109435B05E4C40A0A2F5FC44", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("146d60ab-37ba-8fbf-83f1-89a0976b70c7"), + ConfigurationDefinitionId = new Guid("d7d653e4-d29b-b9be-d701-b4eae2b34d2e"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("7e85c8b9-3fd6-fef6-eea5-d8789601e7de"), + ConfigurationDefinitionId = new Guid("8e334e04-0465-ca82-b4f0-fd01561cdb4a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("e5c9e96a-c891-0854-60b0-b2246870d0c0"), + ConfigurationDefinitionId = new Guid("2b7b2531-54ed-e778-e547-f0b696591d0c"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "AB48409D8EC6C4009EFCDEE399B7DEED9BC132543EE5C2CF518A9201B6BEF41D", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("e79ccc48-28ec-72d3-1331-6c825dc1b7c0"), + ConfigurationDefinitionId = new Guid("50f73169-1bda-2644-6963-b7cfad914a6a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000003"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "7B7FA4E9CF1492587605741B7CEE29F579EC357030B794ED646A19C4474907A6", + ValueJson = "{\"expression\":\"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("49c62e61-ae10-259f-188c-618cd50e22a4"), + ConfigurationDefinitionId = new Guid("9c60f6a6-a0c8-9f27-d31e-030403f78cd9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("6c056e2d-4714-80d0-905a-f49c62ea8d31"), + ConfigurationDefinitionId = new Guid("64767ffc-812e-b48e-db29-f295a287258b"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000004"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "44136FA355B3678A1146AD16F7E8649E94FB4FC21FE77E8310C060F61CAAFF8A", + ValueJson = "{}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("ea4bdba4-397b-d93a-fc6d-03ff3826d2c1"), + ConfigurationDefinitionId = new Guid("1ee4b631-fc15-85dc-3057-a1ca26da7ba9"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "94FA03DA6461D6142CFA6448B23D207BC7AFCC89E3CC4B9A507ADA54864A6B6F", + ValueJson = "{\"value\":\"Test\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("42f554e8-2d02-ce15-b5eb-e9344b3af1de"), + ConfigurationDefinitionId = new Guid("a9be4c68-f2c0-279f-6a98-92b5ac3c0e80"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bfc73c02-2df3-916e-7f54-f432bab37613"), + ConfigurationDefinitionId = new Guid("07333ab1-de72-442d-d91a-0bb2dd969443"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("bf6abd6f-d02c-55f4-a27d-b89c19bc9c35"), + ConfigurationDefinitionId = new Guid("5d326698-5daf-cf78-b44d-2bbe6625d506"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("7ac33a52-7ee3-6b42-78fb-c125f218fa2b"), + ConfigurationDefinitionId = new Guid("62443ac9-c783-01b8-0cf4-21dc6bd57e44"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("ab4a8935-6d46-f6da-d17f-0e2abed7b413"), + ConfigurationDefinitionId = new Guid("14bcd250-6d40-e1a6-5aed-e563c7a2d589"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000101"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("834efeb6-4b29-efa5-9856-465663c13458"), + ConfigurationDefinitionId = new Guid("75c6a433-0dfe-1e3e-d324-322a2fad0d71"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "9EA8921C32C58E37F911E22432BEC6E68686DE6D3B4732B3B08029D606F09FA5", + ValueJson = "{\"value\":\"contoso.local\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("534db414-821b-59d3-b082-3c57efff2bff"), + ConfigurationDefinitionId = new Guid("dfb00c19-363f-7518-47be-1ba0ec16abd7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "03289E6E378FD3D96F2565E9A7B802E0D8AB301F7CAE63F1853CB4080B19EEDF", + ValueJson = "{\"value\":\"Contoso\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4a01be5c-e40f-5a3e-e2af-548739f4d0ae"), + ConfigurationDefinitionId = new Guid("68c57a16-e728-4c39-f245-8a41d77d0aa7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000102"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "41D77AE0AA9812940953F0E186514FBC3AF0E59F19573213C33A206FBE74C903", + ValueJson = "{\"value\":\"CONTOSO\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("d746cb22-0a95-7464-d693-aa5af56ae901"), + ConfigurationDefinitionId = new Guid("efbb9cc6-ed11-105b-91e4-0d925c214e32"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "D6BBF1B384A92232566CF22E32A5D99FC9AC6F92E70D86EC00BF1FD5876F6FFB", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("8175dee7-8e0a-c7e7-8e66-d4f12a4eb42c"), + ConfigurationDefinitionId = new Guid("c32f0de1-59a8-ffb2-a421-92209185de89"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "425625B9EBF4642A17AAEA773F1304A83FC7AA89A00BD4C934B7B63434AA605C", + ValueJson = "{\"value\":\"Content\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("851ce8ed-dc94-d437-4947-f1fbe53e5469"), + ConfigurationDefinitionId = new Guid("753acf7d-8ef6-69ef-b710-d430bfef3a98"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "6B1F221C6266934F56A72E241B1D8D3426B59088F46B12BF78291F75CDC8008C", + ValueJson = "{\"value\":\"SharePoint Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a1c445b1-e063-e267-8721-54c0cdb6b36c"), + ConfigurationDefinitionId = new Guid("16fa79cc-52be-7ba0-56ad-051ce1879851"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "0370D254CED4857D0DEEBF1E9E8D1061DB1503E1E3E12B7393EE534BBD5AF783", + ValueJson = "{\"value\":\"SharePoint Web Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("b08bf2a8-6bd3-1ed9-bf9b-a4f20738a6eb"), + ConfigurationDefinitionId = new Guid("1e409601-2e11-453e-09bc-ccc0e61a2eaf"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "E3D4EFD336BE54EA0E9E1BFC14536244717CCCDF5291FAB78721936BA47673C4", + ValueJson = "{\"value\":\"CL-SQL-01\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("cd9e8e80-1975-10d8-8272-d95ba8275299"), + ConfigurationDefinitionId = new Guid("a1bbb850-c83a-f3ee-474c-dc9484456e2a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 60, + ValueHash = "16EC9E2621F1BA6E974D9005EECC34771B1D6303EE73DCC86214BAD2F5E4CA81", + ValueJson = "{\"value\":\"SVC_SHP_WAP\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("27a2b22c-871b-a5e9-fda1-a862c1238f03"), + ConfigurationDefinitionId = new Guid("80733c50-d68a-d8f9-bb5f-fb6fce6f66a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 70, + ValueHash = "2E39290C9FFD6829B4EFE9004DF7D8236A17E02EE49D03EA79A0DAA936A1F249", + ValueJson = "{\"value\":\"Services\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("665a2e6b-80a7-f64d-85b8-7386c9366549"), + ConfigurationDefinitionId = new Guid("de747816-08b8-faf8-d4ee-57b47222a7f4"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 80, + ValueHash = "ED585C568AA8DAB5EEBB883F90FB02B5B31C614A290A806CFD44E451EC8303ED", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("e69c4719-077b-8ebc-bf06-708bbbca4052"), + ConfigurationDefinitionId = new Guid("a7cc8607-ab28-8765-6fb3-87222c485f65"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 90, + ValueHash = "794D1C1505B58390120A1BE2139A2056C5ED852D4653730DFD4A206060DD3155", + ValueJson = "{\"value\":\"SQLServer\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("2e2fe570-7204-6b79-d073-b62171e5c5ea"), + ConfigurationDefinitionId = new Guid("dc6781e4-7ca7-7307-bf91-42078ba9dea1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 100, + ValueHash = "635B61BE7E1B2CF8197647383A166882478C6632F878068D383D1307C2678EC4", + ValueJson = "{\"value\":1433}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("a2c1e504-20be-aff3-bde2-bcd9ba98bbba"), + ConfigurationDefinitionId = new Guid("4b3283a0-f2df-1edd-fa3f-a90cacf2a7f1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 110, + ValueHash = "1843C3695744571EDFEA9C4765EAC5AE430FC8C704AFE1FFDE02FF6E68D8BE45", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("cd120ede-010a-7433-d59c-13f90301b9e2"), + ConfigurationDefinitionId = new Guid("b5f3de9e-251e-ebb1-c6cc-b4a1a2afc987"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 120, + ValueHash = "09773BB7E26265A65AB115E500C4CD051F10FEAA92C43C4260004F920BFDFAA5", + ValueJson = "{\"value\":\"0000-0000-0000-0000-0000\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("1a37be2a-89b9-4784-e89e-604946b4a2a0"), + ConfigurationDefinitionId = new Guid("e9a93051-120a-00c2-c69d-794d3d3c6c86"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 130, + ValueHash = "178FED388ECABE98936E5F474887112583588BF34C39241AC452A48A3E1CEA11", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("aed99da4-e113-0a05-287e-5cca3abc1c7c"), + ConfigurationDefinitionId = new Guid("d0fbeeb9-628d-fa56-c106-6f54e3080b11"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 140, + ValueHash = "E062DA6C7583AEC7061A78C9650B5B9CE023DD629C9E6FC3184CF8D0EFCF5755", + ValueJson = "{\"value\":\"SharePoint\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("67204f36-a09b-233d-c022-9b4c713f40e1"), + ConfigurationDefinitionId = new Guid("13f4b031-f8b8-1ef4-21b0-ab825dc54aee"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 150, + ValueHash = "5B90965D61E7AD5163813A169214CA5CF9F2297487CEEBFE591487661CBFEBE1", + ValueJson = "{\"value\":{\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n }}", + ValueSourceType = "SecretReference" + }, + new + { + Id = new Guid("680f4dac-c18b-0646-f036-478caf967a7a"), + ConfigurationDefinitionId = new Guid("1fc14a66-5b69-00da-e92c-a38e6d674b50"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 160, + ValueHash = "80473B1B926C839E59F1D74E99D16E1BBC9E57E96B87545421BA23E9BF9E2536", + ValueJson = "{\"value\":4000}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("93bcf261-facd-49b5-376a-fdbb046e46a3"), + ConfigurationDefinitionId = new Guid("f7ea1bce-9cf1-ddc4-320f-e26ef51a6108"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 170, + ValueHash = "7A32645CBAED087EDCAF78976456E695575F839D30D6F09986DDFA3B59E0AA75", + ValueJson = "{\"value\":\"SharePoint Search Service Applications\"}", + ValueSourceType = "Static" + }, + new + { + Id = new Guid("4d9d3f0a-dd2e-7f7a-4bbd-8e33526dcbce"), + ConfigurationDefinitionId = new Guid("3bdcaa78-354c-487f-b0c5-6a3e0b20f8a1"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 10, + ValueHash = "F1D875A6571735F22CA408E51F3793292BD9051C28443A107D3D3AE3E67CC18F", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("f1520907-d5c3-3e33-1daa-0fbdec706c57"), + ConfigurationDefinitionId = new Guid("57fe8654-dbf4-c6c1-3a99-ac68fe393731"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 20, + ValueHash = "B00E74A711838E3C2D4D3779ED0DEAECCF66172565F88F8F9ACE644EEBFBCD91", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("d336f688-57f4-4df1-a992-27e775a48440"), + ConfigurationDefinitionId = new Guid("04091788-4a0a-7911-b11d-b70335ad378a"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 30, + ValueHash = "4D54C78468AB68A528415889AC8B50B89E2F5AFD0B0C36D3F6B060036422009E", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("fc6347da-d00e-db4c-5b5b-5a5e80c568ab"), + ConfigurationDefinitionId = new Guid("7232ce0f-9f3e-e10b-9370-7aec1c610ecc"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 40, + ValueHash = "7EB8E130BDEA0111303714519A04B078E07970AEBD2C51EC0244F90D3E3DFC98", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\"}", + ValueSourceType = "Expression" + }, + new + { + Id = new Guid("0d47df0b-4ae8-e379-42f7-660dbf80cff1"), + ConfigurationDefinitionId = new Guid("73be057e-cd31-1658-186b-bcf4695a48f7"), + 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", + ScopeId = new Guid("72000000-0000-0000-0000-000000000103"), + ScopeType = "TemplateRevision", + SortOrder = 50, + ValueHash = "261FCBE546960FDBA45B615045DC04AE5B717633C4368C87A25A81B31339BE96", + ValueJson = "{\"expression\":\"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"}", + ValueSourceType = "Expression" + }); + }); + + 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") @@ -122,6 +1928,10 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations .HasColumnType("nvarchar(max)") .HasColumnOrder(53); + b.Property("CurrentArtifactId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(5); + b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier") @@ -131,7 +1941,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Property("JSONData") .IsRequired() .HasColumnType("nvarchar(max)") - .HasColumnOrder(5); + .HasColumnOrder(7); b.Property("Modified") .ValueGeneratedOnAdd() @@ -144,15 +1954,31 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations .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( @@ -166,7 +1992,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations JSONData = "{\"role\":\"WebFrontEnd\"}", Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), ModifiedBy = "DemoSeed", - Status = "Pending" + Status = "Pending", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") }, new { @@ -178,7 +2005,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations JSONData = "{\"role\":\"Application\"}", Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), ModifiedBy = "DemoSeed", - Status = "Pending" + Status = "Pending", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000003") }, new { @@ -190,7 +2018,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations JSONData = "{\"role\":\"Node\"}", Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), ModifiedBy = "DemoSeed", - Status = "Pending" + Status = "Pending", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") }, new { @@ -202,7 +2031,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations JSONData = "{\"role\":\"Node\"}", Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), ModifiedBy = "DemoSeed", - Status = "Pending" + Status = "Pending", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") }, new { @@ -214,7 +2044,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations JSONData = "{\"role\":\"Node\"}", Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), ModifiedBy = "DemoSeed", - Status = "Pending" + Status = "Pending", + TemplateRevisionId = new Guid("72000000-0000-0000-0000-000000000103") }); }); @@ -632,7 +2463,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Property("Alias") .HasColumnType("nvarchar(max)") - .HasColumnOrder(5); + .HasColumnOrder(6); b.Property("Created") .ValueGeneratedOnAdd() @@ -662,12 +2493,16 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Property("SortOrder") .HasColumnType("int") - .HasColumnOrder(4); + .HasColumnOrder(5); + + b.Property("TemplateRevisionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(3); b.Property("TemplateRole") .IsRequired() .HasColumnType("nvarchar(max)") - .HasColumnOrder(3); + .HasColumnOrder(4); b.Property("TemplateVersionId") .HasColumnType("uniqueidentifier") @@ -675,6 +2510,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.HasKey("Id"); + b.HasIndex("TemplateRevisionId"); + b.HasIndex("TemplateVersionId"); b.HasIndex("DeploymentGroupId", "SortOrder") @@ -693,6 +2530,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations 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") }, @@ -706,6 +2544,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations 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") }, @@ -719,6 +2558,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations 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") }, @@ -732,6 +2572,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations 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") }, @@ -745,6 +2586,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations 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") }); @@ -2170,6 +4012,230 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.ToTable("TemplateOptions"); }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", 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("IsCurrent") + .HasColumnType("bit") + .HasColumnOrder(6); + + b.Property("IsPublished") + .HasColumnType("bit") + .HasColumnOrder(7); + + b.Property("JsonData") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(3); + + b.Property("JsonHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnOrder(4); + + b.Property("Modified") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasColumnOrder(50) + .HasDefaultValueSql("GETDATE()"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnOrder(51); + + b.Property("PublishedAt") + .HasColumnType("datetime2") + .HasColumnOrder(8); + + b.Property("PublishedBy") + .HasColumnType("nvarchar(max)") + .HasColumnOrder(9); + + b.Property("RevisionNumber") + .HasColumnType("int") + .HasColumnOrder(2); + + b.Property("SchemaVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnOrder(5); + + b.Property("TemplateVersionId") + .HasColumnType("uniqueidentifier") + .HasColumnOrder(1); + + b.HasKey("Id"); + + b.HasIndex("TemplateVersionId") + .IsUnique() + .HasFilter("[IsCurrent] = 1"); + + b.HasIndex("TemplateVersionId", "RevisionNumber") + .IsUnique(); + + b.ToTable("TemplateRevisions", t => + { + t.HasCheckConstraint("CK_TemplateRevisions_JsonData_IsJson", "ISJSON([JsonData]) = 1"); + }); + + b.HasData( + new + { + Id = new Guid("72000000-0000-0000-0000-000000000001"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DomainName\": { \"type\": \"string\", \"defaultValue\": \"corp.contoso.com\" },\n \"NetBIOSName\": { \"type\": \"string\", \"defaultValue\": \"CONTOSO\" }\n },\n \"variables\": {\n \"DefaultSiteName\": \"[concat(parameters('DomainName'), '-DefaultSite')]\"\n },\n \"resources\": {\n \"AllNodes\": [\n { \"NodeName\": \"*\", \"PSDscAllowPlainTextPassword\": true }\n ],\n \"NonNodeData\": {\n \"Services\": {\n \"ActiveDirectory\": {\n \"DomainName\": \"[parameters('DomainName')]\",\n \"NetBIOSName\": \"[parameters('NetBIOSName')]\"\n }\n }\n }\n }\n}", + JsonHash = "C05CBEF91131C75DE53B9609D9C2709D680AFC9559EE8D998318A132490F79A7", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000001") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000002"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"InstanceName\": { \"type\": \"string\", \"defaultValue\": \"MSSQLSERVER\" },\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"Contoso\" }\n },\n \"variables\": {\n \"ConfigDatabase\": \"[concat(parameters('DatabasePrefix'), '_Config')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SqlServer\": {\n \"InstanceName\": \"[parameters('InstanceName')]\",\n \"ConfigDatabase\": \"[variables('ConfigDatabase')]\"\n }\n }\n }\n }\n}", + JsonHash = "F376737E82CB6B729F7B9960CB9988897C16D90A1C454ED2F594B28EB86ECA11", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000002") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000003"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"DatabasePrefix\": { \"type\": \"string\", \"defaultValue\": \"SharePoint_Contoso_Test\" },\n \"FarmAccount\": { \"type\": \"credential\", \"metadata\": { \"description\": \"Farm account resolved by the credential provider.\" } }\n },\n \"variables\": {\n \"ConfigDbName\": \"[concat(parameters('DatabasePrefix'), '_Farm_Config')]\",\n \"AdminContentDbName\": \"[concat(parameters('DatabasePrefix'), '_AdminContent')]\"\n },\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"SharePoint\": {\n \"Farm\": {\n \"ConfigDatabase\": \"[variables('ConfigDbName')]\",\n \"AdminContentDatabase\": \"[variables('AdminContentDbName')]\",\n \"ManagedAccounts\": {\n \"FarmAccount\": \"[parameters('FarmAccount')]\"\n }\n }\n }\n }\n }\n }\n}", + JsonHash = "FD5F0FD3C13538FAC70646972DC364DFCEAAF85BBE91B0F50FDFF9FD3A3748B4", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000003") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000004"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\n \"schemaVersion\": \"1.0\",\n \"templateType\": \"Service\",\n \"parameters\": {\n \"CallingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Calling\" },\n \"MeetingPolicyName\": { \"type\": \"string\", \"defaultValue\": \"Contoso-Standard-Meetings\" }\n },\n \"variables\": {},\n \"resources\": {\n \"NonNodeData\": {\n \"Services\": {\n \"Teams\": {\n \"CallingPolicy\": \"[parameters('CallingPolicyName')]\",\n \"MeetingPolicy\": \"[parameters('MeetingPolicyName')]\"\n }\n }\n }\n }\n}", + JsonHash = "32A902FE1A871D4CE2C877EBC5542F7562856532F09BA7F53597B21270586241", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000004") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000101"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Environment\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Environment\",\r\n \"Name\": \"Test\"\r\n },\r\n \"parameters\": {\r\n \"Landscape\": {\r\n \"DefaultValue\": \"Prod\",\r\n \"Value\": \"Test\",\r\n \"Type\": \"string\",\r\n \"AllowedValues\": [\r\n \"Prod\",\r\n \"QA\",\r\n \"Test\"\r\n ]\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n\r\n }\r\n}", + JsonHash = "58553C7A4E902B5E39D30272754FEF9EF805A7F36363D8316A9B37540C6D4646", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000101") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000102"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Domain\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Domain\",\r\n \"Name\": \"Contoso\"\r\n },\r\n \"parameters\": {\r\n \"DomainFQDN\": {\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9.-]+$\",\r\n \"Type\": \"string\",\r\n \"Value\": \"contoso.local\",\r\n \"Required\": true\r\n },\r\n \"DomainLabel\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 32,\r\n \"Value\": \"Contoso\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z][A-Za-z0-9_-]*$\",\r\n \"MinLength\": 2,\r\n \"Required\": false\r\n },\r\n \"DomainNetBIOS\": {\r\n \"Type\": \"string\",\r\n \"MaxLength\": 15,\r\n \"Value\": \"CONTOSO\",\r\n \"DefaultValue\": \"\",\r\n \"Pattern\": \"^[A-Za-z0-9_-]+$\",\r\n \"MinLength\": 1,\r\n \"Required\": true\r\n }\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"ActiveDirectory\": {\r\n \"NetBIOSName\": \"[parameters(\\u0027DomainNetBIOS\\u0027)]\",\r\n \"DomainName\": \"[parameters(\\u0027DomainFQDN\\u0027)]\"\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "B265C4D542826423BAAF50BF939F026CC67FF631FEC19F708067516BCE4C7667", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000102") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000103"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Service\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Service\",\r\n \"Name\": \"SharePoint.Contoso\"\r\n },\r\n \"parameters\": {\r\n \"FarmCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ContentDatabaseSegment\": {\r\n \"DefaultValue\": \"Content\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Content-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint content databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"ServiceApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint service applications.\"\r\n }\r\n }\r\n },\r\n \"WebApplicationPoolDefault\": {\r\n \"DefaultValue\": \"SharePoint Web Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Standard-Application-Pools fuer SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Display name of the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"DatabaseServerName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"CL-SQL-01\"\r\n },\r\n \"WebApplicationPoolDefaultAccount\": {\r\n \"DefaultValue\": \"SVC_SHP_WAP\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Webanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint web applications.\"\r\n }\r\n }\r\n },\r\n \"ServiceDatabaseSegment\": {\r\n \"DefaultValue\": \"Services\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Namenssegment fuer SharePoint-Service-Datenbanken innerhalb des Datenbanknamens.\",\r\n \"en-US\": \"Name segment used for SharePoint service databases within the database name.\"\r\n }\r\n }\r\n },\r\n \"FarmPassphrase\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/FarmPassphrase\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabaseInstanceName\": {\r\n \"DefaultValue\": \"SQL_Server\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SQLServer\"\r\n },\r\n \"DatabaseTcpPort\": {\r\n \"DefaultValue\": 1433,\r\n \"Type\": \"int\",\r\n \"Value\": 1433\r\n },\r\n \"DefaultServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Standard-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the default application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/DefaultServiceAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"ProductKey\": {\r\n \"DefaultValue\": \"0000-0000-0000-0000-0000\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"SharePoint-Produktlizenzschluessel.\",\r\n \"en-US\": \"SharePoint product license key.\"\r\n }\r\n }\r\n },\r\n \"SetupCredential\": {\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SetupAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"DatabasePrefix\": {\r\n \"DefaultValue\": \"SharePoint\",\r\n \"Type\": \"string\",\r\n \"Value\": \"SharePoint\"\r\n },\r\n \"SearchServiceApplicationPoolAccount\": {\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Kontoname fuer den Search-Application-Pool der SharePoint-Serviceanwendungen.\",\r\n \"en-US\": \"Account name used by the search application pool for SharePoint service applications.\"\r\n }\r\n },\r\n \"Sensitive\": true,\r\n \"Value\": {\r\n \"Provider\": \"SecretManagement\",\r\n \"Vault\": \"Test\",\r\n \"Name\": \"Windows/SharePoint/SearchAccount\"\r\n },\r\n \"Type\": \"credential\",\r\n \"Required\": true\r\n },\r\n \"CentralAdminPort\": {\r\n \"DefaultValue\": 443,\r\n \"Type\": \"int\",\r\n \"Value\": 4000\r\n },\r\n \"ServiceApplicationPoolSearch\": {\r\n \"DefaultValue\": \"SharePoint Search Service Applications\",\r\n \"Type\": \"string\",\r\n \"Metadata\": {\r\n \"Description\": {\r\n \"de-DE\": \"Anzeigename des Application-Pools fuer SharePoint Search-Serviceanwendungen.\",\r\n \"en-US\": \"Display name of the application pool for SharePoint Search service applications.\"\r\n }\r\n }\r\n }\r\n },\r\n \"variables\": {\r\n \"AdminDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_AdminContent\\u0027)]\",\r\n \"ContentDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ContentDatabaseSegment\\u0027))]\",\r\n \"ServiceDbPrefix\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), parameters(\\u0027ServiceDatabaseSegment\\u0027))]\",\r\n \"DatabasePrefix\": \"[joinNotEmpty(\\u0027_\\u0027, parameters(\\u0027DatabasePrefix\\u0027), parameters(\\u0027DomainLabel\\u0027), if(equals(parameters(\\u0027Landscape\\u0027), \\u0027Test\\u0027), \\u0027Test\\u0027, \\u0027\\u0027))]\",\r\n \"ConfigDbName\": \"[joinNotEmpty(\\u0027_\\u0027, variables(\\u0027DatabasePrefix\\u0027), \\u0027Farm_Config\\u0027)]\"\r\n },\r\n \"resources\": {\r\n \"AllNodes\": [\r\n {\r\n \"PSDscAllowDomainUser\": true,\r\n \"PSDSCAllowPlainTextPassword\": true,\r\n \"NodeName\": \"*\",\r\n \"RunCentralAdministration\": false\r\n }\r\n ],\r\n \"NonNodeData\": {\r\n \"Services\": {\r\n \"SharePoint\": {\r\n \"Farm\": {\r\n \"ManagedAccounts\": {\r\n \"DefaultServiceApplicationPoolAccount\": \"[parameters(\\u0027DefaultServiceApplicationPoolAccount\\u0027)]\",\r\n \"FarmAccount\": \"[parameters(\\u0027FarmCredential\\u0027)]\",\r\n \"SearchServiceApplicationPoolAccount\": \"[parameters(\\u0027SearchServiceApplicationPoolAccount\\u0027)]\"\r\n },\r\n \"Passphrase\": \"[parameters(\\u0027FarmPassphrase\\u0027)]\",\r\n \"ServiceApplications\": {\r\n \"AppManagementService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027AppManagement\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"StateService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027StateService\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SubscriptionSettingsService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SubscriptionSettings\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"ManagedMetadataService\": {\r\n \"Name\": \"Managed Metadata Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027ManagedMetadata\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SearchService\": {\r\n \"Name\": \"Search Service Application\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027Search\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.SearchServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"UsageAndHealthService\": {\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027UsageAndHealth\\u0027)]\",\r\n \"Provision\": true\r\n },\r\n \"SecureStoreService\": {\r\n \"Name\": \"Secure Store Service\",\r\n \"DatabaseName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027),\\u0027SecureStore\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"AuditingEnabled\": true\r\n },\r\n \"UserProfileService\": {\r\n \"SyncDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Sync\\u0027)]\",\r\n \"ApplicationPool\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ServiceApplicationPools.DefaultServiceApplicationPool\\u0027, \\u0027Name\\u0027)]\",\r\n \"Provision\": true,\r\n \"Name\": \"User Profile Service\",\r\n \"SocialDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Social\\u0027)]\",\r\n \"ProfileDBName\": \"[concat(variables(\\u0027ServiceDbPrefix\\u0027), \\u0027UserProfile_Profile\\u0027)]\"\r\n }\r\n },\r\n \"CentralAdminAuth\": \"NTLM\",\r\n \"ConfigDatabaseName\": \"[variables(\\u0027ConfigDbName\\u0027)]\",\r\n \"Accounts\": {\r\n \"SetupAccount\": \"[parameters(\\u0027SetupCredential\\u0027)]\"\r\n },\r\n \"CentralAdminPort\": \"[parameters(\\u0027CentralAdminPort\\u0027)]\",\r\n \"AdminContentDatabase\": \"[variables(\\u0027AdminDbName\\u0027)]\",\r\n \"ServiceApplicationPools\": {\r\n \"SearchServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.SearchServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolSearch\\u0027)]\"\r\n },\r\n \"DefaultServiceApplicationPool\": {\r\n \"Account\": \"[reference(\\u0027Resources.NonNodeData.Services.SharePoint.Farm.ManagedAccounts.DefaultServiceApplicationPoolAccount\\u0027, \\u0027UserName\\u0027)]\",\r\n \"Name\": \"[parameters(\\u0027ServiceApplicationPoolDefault\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"Database\": {\r\n \"Targets\": {\r\n \"Farm\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Content\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n },\r\n \"Service\": {\r\n \"Server\": \"SQLServer\",\r\n \"DependsOnAlias\": \"SQLServer\"\r\n }\r\n },\r\n \"SQLAlias\": {\r\n \"SQLServer\": {\r\n \"InstanceName\": \"[parameters(\\u0027DatabaseInstanceName\\u0027)]\",\r\n \"ServerName\": \"[parameters(\\u0027DatabaseServerName\\u0027)]\",\r\n \"Protocol\": \"TCP\",\r\n \"TcpPort\": \"[parameters(\\u0027DatabaseTcpPort\\u0027)]\"\r\n }\r\n }\r\n },\r\n \"General\": {\r\n \"ProductKey\": \"[parameters(\\u0027ProductKey\\u0027)]\"\r\n },\r\n \"Windows\": {\r\n \"Registry\": {\r\n \"DisableLoopbackCheck\": {\r\n \"Path\": \"HKLM:\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\",\r\n \"Name\": \"DisableLoopbackCheck\",\r\n \"Value\": 1,\r\n \"Type\": \"DWord\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}", + JsonHash = "E3B0E2A8E0C85CCD92AEA521ECD243E61E34C61D7078D6715E6317F5669A1D69", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000103") + }, + new + { + Id = new Guid("72000000-0000-0000-0000-000000000104"), + Created = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + CreatedBy = "DemoSeed", + IsCurrent = true, + IsPublished = true, + JsonData = "{\r\n \"schemaVersion\": \"1.0\",\r\n \"templateType\": \"Stage\",\r\n \"metadata\": {\r\n \"TemplateType\": \"Stage\",\r\n \"Name\": \"Install\"\r\n },\r\n \"parameters\": {\r\n\r\n },\r\n \"variables\": {\r\n\r\n },\r\n \"resources\": {\r\n \"NonNodeData\": {\r\n \"LocalConfigurationManager\": {\r\n \"RefreshFrequencyMins\": \"30\",\r\n \"RefreshMode\": \"PUSH\",\r\n \"ConfigurationModeFrequencyMins\": \"120\",\r\n \"ConfigurationMode\": \"ApplyOnly\"\r\n }\r\n }\r\n }\r\n}", + JsonHash = "ACA23E44C9F625F080D2653646555A9DE5546D8DE7BB2166324E775BCF47F3C1", + Modified = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + ModifiedBy = "DemoSeed", + PublishedAt = new DateTime(2026, 7, 7, 0, 0, 0, 0, DateTimeKind.Utc), + PublishedBy = "DemoSeed", + RevisionNumber = 1, + SchemaVersion = "1.0", + TemplateVersionId = new Guid("71000000-0000-0000-0000-000000000104") + }); + }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => { b.Property("Id") @@ -2384,6 +4450,62 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations }); }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ApiTokenModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ApiClientModel", "ApiClient") + .WithMany() + .HasForeignKey("ApiClientId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ApiClient"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("ConfigurationDefinitions") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TemplateRevision"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationValueModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", "ConfigurationDefinition") + .WithMany("Values") + .HasForeignKey("ConfigurationDefinitionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ConfigurationDefinition"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") + .WithMany("Artifacts") + .HasForeignKey("DeploymentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TargetModel", "Target") + .WithMany() + .HasForeignKey("TargetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", "Deployment") + .WithMany("Artifacts") + .HasForeignKey("TargetId", "DeploymentGroupId") + .OnDelete(DeleteBehavior.NoAction); + + b.Navigation("Deployment"); + + b.Navigation("DeploymentGroup"); + + b.Navigation("Target"); + }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => { b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", "DeploymentRule") @@ -2404,6 +4526,11 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentArtifactModel", "CurrentArtifact") + .WithMany() + .HasForeignKey("CurrentArtifactId") + .OnDelete(DeleteBehavior.NoAction); + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", "DeploymentGroup") .WithMany("Deployments") .HasForeignKey("DeploymentGroupId") @@ -2416,9 +4543,18 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("Deployments") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("CurrentArtifact"); + b.Navigation("DeploymentGroup"); b.Navigation("Target"); + + b.Navigation("TemplateRevision"); }); modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentParameterValueModel", b => @@ -2477,6 +4613,11 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", "TemplateRevision") + .WithMany("DeploymentTemplateSelections") + .HasForeignKey("TemplateRevisionId") + .OnDelete(DeleteBehavior.Restrict); + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") .WithMany() .HasForeignKey("TemplateVersionId") @@ -2485,6 +4626,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Navigation("DeploymentGroup"); + b.Navigation("TemplateRevision"); + b.Navigation("TemplateVersion"); }); @@ -2614,6 +4757,17 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Navigation("Template"); }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", "TemplateVersion") + .WithMany("TemplateRevisions") + .HasForeignKey("TemplateVersionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TemplateVersion"); + }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => { b.HasOne("Microsoft.SelfService.Portal.Core.API.Models.TemplateModel", "Template") @@ -2625,8 +4779,15 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Navigation("Template"); }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.ConfigurationDefinitionModel", b => + { + b.Navigation("Values"); + }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentGroupModel", b => { + b.Navigation("Artifacts"); + b.Navigation("Deployments"); b.Navigation("ParameterValues"); @@ -2636,6 +4797,11 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Navigation("TemplateSelections"); }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentModel", b => + { + b.Navigation("Artifacts"); + }); + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.DeploymentRuleModel", b => { b.Navigation("Steps"); @@ -2695,6 +4861,20 @@ namespace Microsoft.SelfService.Portal.Core.API.Migrations b.Navigation("TemplateVersions"); }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateRevisionModel", b => + { + b.Navigation("ConfigurationDefinitions"); + + b.Navigation("DeploymentTemplateSelections"); + + b.Navigation("Deployments"); + }); + + modelBuilder.Entity("Microsoft.SelfService.Portal.Core.API.Models.TemplateVersionModel", b => + { + b.Navigation("TemplateRevisions"); + }); #pragma warning restore 612, 618 } } diff --git a/Models/ApiClientModel.cs b/Models/ApiClientModel.cs new file mode 100644 index 0000000..f594db4 --- /dev/null +++ b/Models/ApiClientModel.cs @@ -0,0 +1,28 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public class ApiClientModel : BaseModel + { + [Column(Order = 1)] + public string ClientId { get; set; } = string.Empty; + + [Column(Order = 2)] + public string Name { get; set; } = string.Empty; + + [Column(Order = 3)] + public string SecretHash { get; set; } = string.Empty; + + [Column(Order = 4)] + public string ScopesJson { get; set; } = "[]"; + + [Column(Order = 5)] + public bool IsEnabled { get; set; } = true; + + [Column(Order = 6)] + public DateTime? ExpiresAt { get; set; } + + [Column(Order = 7)] + public DateTime? LastUsedAt { get; set; } + } +} diff --git a/Models/ApiTokenModel.cs b/Models/ApiTokenModel.cs new file mode 100644 index 0000000..9e24e3d --- /dev/null +++ b/Models/ApiTokenModel.cs @@ -0,0 +1,42 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public class ApiTokenModel : BaseModel + { + [Column(Order = 1)] + public string Jti { get; set; } = string.Empty; + + [Column(Order = 2)] + public string Subject { get; set; } = string.Empty; + + [Column(Order = 3)] + public string SubjectType { get; set; } = "User"; + + [Column(Order = 4)] + public Guid? ApiClientId { get; set; } + + [Column(Order = 5)] + public string Name { get; set; } = string.Empty; + + [Column(Order = 6)] + public string ScopesJson { get; set; } = "[]"; + + [Column(Order = 7)] + public DateTime IssuedAt { get; set; } = DateTime.UtcNow; + + [Column(Order = 8)] + public DateTime ExpiresAt { get; set; } + + [Column(Order = 9)] + public DateTime? RevokedAt { get; set; } + + [Column(Order = 10)] + public string? RevokedBy { get; set; } + + [Column(Order = 11)] + public DateTime? LastUsedAt { get; set; } + + public ApiClientModel? ApiClient { get; set; } + } +} diff --git a/Models/ConfigurationDefinitionModel.cs b/Models/ConfigurationDefinitionModel.cs new file mode 100644 index 0000000..e19acbf --- /dev/null +++ b/Models/ConfigurationDefinitionModel.cs @@ -0,0 +1,31 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public static class ConfigurationDefinitionKinds + { + public const string Parameter = "Parameter"; + public const string Variable = "Variable"; + } + + public class ConfigurationDefinitionModel : BaseModel + { + [Column(Order = 1)] + public Guid? TemplateRevisionId { get; set; } + + [Column(Order = 2)] + public string Kind { get; set; } = ConfigurationDefinitionKinds.Parameter; + + [Column(Order = 3)] + public string Name { get; set; } = string.Empty; + + [Column(Order = 4)] + public string PropertiesJson { get; set; } = "{}"; + + [Column(Order = 5)] + public string DefinitionHash { get; set; } = string.Empty; + + public TemplateRevisionModel? TemplateRevision { get; set; } + public ICollection Values { get; set; } = new List(); + } +} diff --git a/Models/ConfigurationValueModel.cs b/Models/ConfigurationValueModel.cs new file mode 100644 index 0000000..b8ecdb3 --- /dev/null +++ b/Models/ConfigurationValueModel.cs @@ -0,0 +1,52 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public static class ConfigurationValueSourceTypes + { + public const string Static = "Static"; + public const string ScopeProperty = "ScopeProperty"; + public const string Expression = "Expression"; + public const string SecretReference = "SecretReference"; + } + + public static class ConfigurationValueScopeTypes + { + public const string TemplateRevision = "TemplateRevision"; + public const string Environment = "Environment"; + public const string Domain = "Domain"; + public const string Target = "Target"; + public const string DeploymentGroup = "DeploymentGroup"; + public const string Deployment = "Deployment"; + public const string TemplateSelection = "TemplateSelection"; + } + + public class ConfigurationValueModel : BaseModel + { + [Column(Order = 1)] + public Guid ConfigurationDefinitionId { get; set; } + + [Column(Order = 2)] + public string ScopeType { get; set; } = ConfigurationValueScopeTypes.TemplateRevision; + + [Column(Order = 3)] + public Guid ScopeId { get; set; } + + [Column(Order = 4)] + public string ValueSourceType { get; set; } = ConfigurationValueSourceTypes.Static; + + [Column(Order = 5)] + public string? SourcePath { get; set; } + + [Column(Order = 6)] + public string? ValueJson { get; set; } + + [Column(Order = 7)] + public string ValueHash { get; set; } = string.Empty; + + [Column(Order = 8)] + public int SortOrder { get; set; } + + public ConfigurationDefinitionModel ConfigurationDefinition { get; set; } = null!; + } +} diff --git a/Models/CredentialSecretModel.cs b/Models/CredentialSecretModel.cs new file mode 100644 index 0000000..1079b95 --- /dev/null +++ b/Models/CredentialSecretModel.cs @@ -0,0 +1,25 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public class CredentialSecretModel : BaseModel + { + [Column(Order = 1)] + public string Name { get; set; } = string.Empty; + + [Column(Order = 2)] + public string? UserName { get; set; } + + [Column(Order = 3)] + public string SecretValue { get; set; } = string.Empty; + + [Column(Order = 4)] + public string SecretType { get; set; } = "Credential"; + + [Column(Order = 5)] + public string? MetadataJson { get; set; } + + [Column(Order = 6)] + public bool IsEnabled { get; set; } = true; + } +} diff --git a/Models/DeploymentArtifactModel.cs b/Models/DeploymentArtifactModel.cs new file mode 100644 index 0000000..34cf796 --- /dev/null +++ b/Models/DeploymentArtifactModel.cs @@ -0,0 +1,58 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public static class DeploymentArtifactTypes + { + public const string Preview = "Preview"; + public const string ResolvedConfigurationData = "ResolvedConfigurationData"; + public const string Mof = "Mof"; + public const string PullServerPackage = "PullServerPackage"; + } + + public class DeploymentArtifactModel : BaseModel + { + [Column(Order = 1)] + public Guid DeploymentGroupId { get; set; } + + [Column(Order = 2)] + public Guid? DeploymentTargetId { get; set; } + + [Column(Order = 3)] + public Guid? TargetId { get; set; } + + [Column(Order = 4)] + public string ArtifactType { get; set; } = DeploymentArtifactTypes.ResolvedConfigurationData; + + [Column(Order = 5)] + public string Status { get; set; } = QueueJobStatus.Pending; + + [Column(Order = 6)] + public string DeploymentJson { get; set; } = "{}"; + + [Column(Order = 7)] + public string? SourceJson { get; set; } + + [Column(Order = 8)] + public string? ResolvedJson { get; set; } + + [Column(Order = 9)] + public string? SourceSnapshotJson { get; set; } + + [Column(Order = 10)] + public string InputHash { get; set; } = string.Empty; + + [Column(Order = 11)] + public string OutputHash { get; set; } = string.Empty; + + [Column(Order = 12)] + public bool IsStale { get; set; } + + [Column(Order = 13)] + public string? StaleReasonJson { get; set; } + + public DeploymentGroupModel DeploymentGroup { get; set; } = null!; + public DeploymentModel? Deployment { get; set; } + public TargetModel? Target { get; set; } + } +} diff --git a/Models/DeploymentBatchModel.cs b/Models/DeploymentBatchModel.cs index 5ccca09..2be104f 100644 --- a/Models/DeploymentBatchModel.cs +++ b/Models/DeploymentBatchModel.cs @@ -22,6 +22,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Models public ICollection TemplateSelections { get; set; } = new List(); public ICollection ParameterValues { get; set; } = new List(); public ICollection TargetAssignments { get; set; } = new List(); + public ICollection Artifacts { get; set; } = new List(); } } diff --git a/Models/DeploymentTargetModel.cs b/Models/DeploymentTargetModel.cs index 451e80c..79ed0ac 100644 --- a/Models/DeploymentTargetModel.cs +++ b/Models/DeploymentTargetModel.cs @@ -9,12 +9,23 @@ namespace Microsoft.SelfService.Portal.Core.API.Models [Column(Order = 3)] public Guid TargetId { get; set; } [Column(Order = 4)] - public string Status { get; set; } + public Guid? TemplateRevisionId { get; set; } [Column(Order = 5)] + public Guid? CurrentArtifactId { get; set; } + [Column(Order = 6)] + public string Status { get; set; } + [Column(Order = 7)] public string JSONData { get; set; } + [Column(Order = 8)] + public string? OverridesJson { get; set; } + [Column(Order = 9)] + public string? SourceJson { get; set; } public DeploymentGroupModel DeploymentGroup { get; set; } public TargetModel Target { get; set; } + public TemplateRevisionModel? TemplateRevision { get; set; } + public DeploymentArtifactModel? CurrentArtifact { get; set; } + public ICollection Artifacts { get; set; } = new List(); } } diff --git a/Models/DeploymentTemplateSelectionModel.cs b/Models/DeploymentTemplateSelectionModel.cs index 0f41ce8..e6cca3f 100644 --- a/Models/DeploymentTemplateSelectionModel.cs +++ b/Models/DeploymentTemplateSelectionModel.cs @@ -11,16 +11,20 @@ namespace Microsoft.SelfService.Portal.Core.API.Models public Guid TemplateVersionId { get; set; } [Column(Order = 3)] - public string TemplateRole { get; set; } = "Service"; + public Guid? TemplateRevisionId { get; set; } [Column(Order = 4)] - public int SortOrder { get; set; } + public string TemplateRole { get; set; } = "Service"; [Column(Order = 5)] + public int SortOrder { get; set; } + + [Column(Order = 6)] public string? Alias { get; set; } public DeploymentGroupModel DeploymentGroup { get; set; } = null!; public TemplateVersionModel TemplateVersion { get; set; } = null!; + public TemplateRevisionModel? TemplateRevision { get; set; } } } diff --git a/Models/TemplateRevisionModel.cs b/Models/TemplateRevisionModel.cs new file mode 100644 index 0000000..8e9dbf8 --- /dev/null +++ b/Models/TemplateRevisionModel.cs @@ -0,0 +1,45 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Microsoft.SelfService.Portal.Core.API.Models +{ + public class TemplateRevisionModel : BaseModel + { + [Column(Order = 1)] + public Guid TemplateVersionId { get; set; } + + [Column(Order = 2)] + public int RevisionNumber { get; set; } + + [Column(Order = 3)] + public string JsonData { get; set; } = "{}"; + + [Column(Order = 4)] + public string JsonHash { get; set; } = string.Empty; + + [Column(Order = 5)] + public string SchemaVersion { get; set; } = "1.0"; + + [Column(Order = 6)] + public bool IsCurrent { get; set; } + + [Column(Order = 7)] + public bool IsPublished { get; set; } + + [Column(Order = 8)] + public DateTime? PublishedAt { get; set; } + + [Column(Order = 9)] + public string? PublishedBy { get; set; } + + public TemplateVersionModel TemplateVersion { get; set; } = null!; + public ICollection ConfigurationDefinitions { get; set; } = new List(); + public ICollection DeploymentTemplateSelections { get; set; } = new List(); + public ICollection Deployments { get; set; } = new List(); + + public void SetJsonData(string jsonData) + { + JsonData = string.IsNullOrWhiteSpace(jsonData) ? "{}" : jsonData; + JsonHash = TemplateVersionModel.ComputeSha256(JsonData); + } + } +} diff --git a/Models/TemplateVersionModel.cs b/Models/TemplateVersionModel.cs index a71301e..3466901 100644 --- a/Models/TemplateVersionModel.cs +++ b/Models/TemplateVersionModel.cs @@ -31,6 +31,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Models public string? PublishedBy { get; set; } public TemplateModel Template { get; set; } = null!; + public ICollection TemplateRevisions { get; set; } = new List(); public void SetJsonData(string jsonData) { diff --git a/Program.cs b/Program.cs index 43eaa63..254900c 100644 --- a/Program.cs +++ b/Program.cs @@ -1,11 +1,14 @@ -using Microsoft.AspNetCore.Authentication.Negotiate; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authentication.Negotiate; using Microsoft.EntityFrameworkCore; +using Microsoft.IdentityModel.Tokens; using Microsoft.SelfService.Portal.Core.API.Context; using Microsoft.SelfService.Portal.Core.API.Interfaces; using Microsoft.SelfService.Portal.Core.API.Repository; using Microsoft.SelfService.Portal.Core.API.Services; using Microsoft.Extensions.FileProviders; +using System.IdentityModel.Tokens.Jwt; using System.Text.Json.Serialization; @@ -27,6 +30,7 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); @@ -36,8 +40,72 @@ builder.Services.AddAutoMapper(_ => { }, AppDomain.CurrentDomain.GetAssemblies() builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("Context") ?? throw new InvalidOperationException("Connection string 'Context' not found."))); -builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme) - .AddNegotiate(); +var tokenService = new ApiTokenService(builder.Configuration); + +builder.Services.AddAuthentication(options => + { + options.DefaultScheme = "Smart"; + options.DefaultChallengeScheme = "Smart"; + }) + .AddPolicyScheme("Smart", "Negotiate or Bearer", options => + { + options.ForwardDefaultSelector = context => + { + var authorization = context.Request.Headers.Authorization.ToString(); + return authorization.StartsWith("Bearer ", StringComparison.OrdinalIgnoreCase) + ? JwtBearerDefaults.AuthenticationScheme + : NegotiateDefaults.AuthenticationScheme; + }; + }) + .AddNegotiate() + .AddJwtBearer(options => + { + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuer = true, + ValidIssuer = tokenService.Issuer, + ValidateAudience = true, + ValidAudience = tokenService.Audience, + ValidateIssuerSigningKey = true, + IssuerSigningKey = tokenService.GetSigningKey(), + ValidateLifetime = true, + ClockSkew = TimeSpan.FromMinutes(2) + }; + + options.Events = new JwtBearerEvents + { + OnTokenValidated = context => + { + var jti = context.Principal?.FindFirst(JwtRegisteredClaimNames.Jti)?.Value; + if (string.IsNullOrWhiteSpace(jti)) + { + context.Fail("Token does not contain a token id."); + return Task.CompletedTask; + } + + var dataContext = context.HttpContext.RequestServices.GetRequiredService(); + var token = dataContext.ApiTokens.FirstOrDefault(existing => existing.Jti == jti); + if (token == null) + { + context.Fail("Token is not registered."); + return Task.CompletedTask; + } + + if (token.RevokedAt.HasValue || token.ExpiresAt <= DateTime.UtcNow) + { + context.Fail("Token is revoked or expired."); + return Task.CompletedTask; + } + + token.LastUsedAt = DateTime.UtcNow; + token.Modified = DateTime.UtcNow; + token.ModifiedBy = "BearerToken"; + dataContext.SaveChanges(); + + return Task.CompletedTask; + } + }; + }); builder.Services.AddHttpContextAccessor(); @@ -45,6 +113,15 @@ builder.Services.AddAuthorization(options => { // By default, all incoming requests will be authorized according to the default policy. options.FallbackPolicy = options.DefaultPolicy; + options.AddPolicy("QueueProcess", policy => policy.RequireClaim("scope", "queue.process")); + options.AddPolicy("DeploymentRead", policy => policy.RequireClaim("scope", "deployment.read")); + options.AddPolicy("CredentialResolve", policy => policy.RequireClaim("scope", "credential.resolve")); + options.AddPolicy("TokenManage", policy => policy.RequireAssertion(context => + context.User.HasClaim("scope", "token.manage") + || context.User.Identity?.AuthenticationType == NegotiateDefaults.AuthenticationScheme)); + options.AddPolicy("TokenAdmin", policy => policy.RequireAssertion(context => + context.User.HasClaim("scope", "token.admin") + || context.User.Identity?.AuthenticationType == NegotiateDefaults.AuthenticationScheme)); }); var app = builder.Build(); @@ -101,3 +178,5 @@ if (Directory.Exists(frontendDistPath)) app.Run(); + + diff --git a/Repository/DeploymentBatchRepository.cs b/Repository/DeploymentBatchRepository.cs index 42bffae..08c300a 100644 --- a/Repository/DeploymentBatchRepository.cs +++ b/Repository/DeploymentBatchRepository.cs @@ -55,6 +55,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository var templateVersion = requestedTemplateVersionId.HasValue ? _context.TemplateVersions + .Include(version => version.TemplateRevisions) .Include(version => version.Template) .ThenInclude(template => template.TemplateCategory) .ThenInclude(category => category.Service) @@ -66,6 +67,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository .Include(existing => existing.TemplateCategory) .ThenInclude(existing => existing.Service) .Include(existing => existing.TemplateVersions) + .ThenInclude(version => version.TemplateRevisions) .FirstOrDefault(existing => existing.Id == deploymentBatch.TemplateId); if (template == null) @@ -128,11 +130,32 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository Id = Guid.NewGuid(), DeploymentGroupId = deploymentBatch.Id, TemplateVersionId = templateVersion.Id, + TemplateRevisionId = templateVersion.TemplateRevisions?.FirstOrDefault(revision => revision.IsCurrent)?.Id, TemplateRole = "Service", SortOrder = 10, Alias = template.Name }); } + else + { + foreach (var selection in deploymentBatch.TemplateSelections) + { + if (selection.TemplateRevisionId.HasValue) + { + continue; + } + + var selectedVersion = selection.TemplateVersionId == templateVersion?.Id + ? templateVersion + : _context.TemplateVersions + .Include(version => version.TemplateRevisions) + .FirstOrDefault(version => version.Id == selection.TemplateVersionId); + + selection.TemplateRevisionId = selectedVersion?.TemplateRevisions + ?.FirstOrDefault(revision => revision.IsCurrent) + ?.Id; + } + } if (deploymentBatch.TargetAssignments.Count == 0) { @@ -170,6 +193,10 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository { DeploymentGroupId = deploymentBatch.Id, TargetId = targetId, + TemplateRevisionId = deploymentBatch.TemplateSelections + .OrderBy(selection => selection.SortOrder) + .Select(selection => selection.TemplateRevisionId) + .FirstOrDefault(), Status = QueueJobStatus.Pending, JSONData = "{}" }); diff --git a/Repository/TemplateRepository.cs b/Repository/TemplateRepository.cs index 3f384e6..0ff8402 100644 --- a/Repository/TemplateRepository.cs +++ b/Repository/TemplateRepository.cs @@ -3,6 +3,7 @@ using Microsoft.SelfService.Portal.Core.API.Context; using Microsoft.SelfService.Portal.Core.API.Interfaces; using Microsoft.SelfService.Portal.Core.API.JsonDocuments; using Microsoft.SelfService.Portal.Core.API.Models; +using System.Text.Json; namespace Microsoft.SelfService.Portal.Core.API.Repository { @@ -67,6 +68,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository PublishedBy = template.CreatedBy }; version.SetJsonData(document.JsonData); + version.TemplateRevisions.Add(CreateTemplateRevision(version.Id, document.JsonData, document.SchemaVersion, true, template.CreatedBy)); template.TemplateVersions.Add(version); _context.Add(template); @@ -87,7 +89,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository var document = ConfigurationDocumentValidator.NormalizeAndValidate(template.JSONData, ConfigurationDocumentKind.Template); var jsonData = document.JsonData; var publishedVersion = existingTemplate.TemplateVersions.FirstOrDefault(version => version.IsPublished); - var jsonChanged = publishedVersion == null || !string.Equals(publishedVersion.JsonData, jsonData, StringComparison.Ordinal); + var currentRevision = publishedVersion == null ? null : GetCurrentTemplateRevision(publishedVersion.Id); + var jsonChanged = currentRevision == null || !string.Equals(currentRevision.JsonData, jsonData, StringComparison.Ordinal); existingTemplate.Name = template.Name; existingTemplate.Version = template.Version; @@ -100,28 +103,39 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository if (jsonChanged) { - var versionName = GetUniqueVersionName( - existingTemplate.Id, - string.IsNullOrWhiteSpace(template.Version) ? DateTime.UtcNow.ToString("yyyyMMddHHmmss") : template.Version); - - var version = new TemplateVersionModel + var version = publishedVersion; + if (version == null || !string.Equals(version.Version, template.Version, StringComparison.OrdinalIgnoreCase)) { - Id = Guid.NewGuid(), - TemplateId = existingTemplate.Id, - Version = versionName, - SchemaVersion = document.SchemaVersion, - IsPublished = true, - PublishedAt = DateTime.UtcNow, - PublishedBy = template.ModifiedBy - }; - version.SetJsonData(jsonData); + var versionName = GetUniqueVersionName( + existingTemplate.Id, + string.IsNullOrWhiteSpace(template.Version) ? DateTime.UtcNow.ToString("yyyyMMddHHmmss") : template.Version); - foreach (var existingVersion in existingTemplate.TemplateVersions) + version = new TemplateVersionModel + { + Id = Guid.NewGuid(), + TemplateId = existingTemplate.Id, + Version = versionName, + SchemaVersion = document.SchemaVersion, + IsPublished = true, + PublishedAt = DateTime.UtcNow, + PublishedBy = template.ModifiedBy + }; + existingTemplate.TemplateVersions.Add(version); + } + + version.SetJsonData(jsonData); + version.SchemaVersion = document.SchemaVersion; + version.IsPublished = true; + version.PublishedAt = DateTime.UtcNow; + version.PublishedBy = template.ModifiedBy; + + foreach (var existingVersion in existingTemplate.TemplateVersions.Where(existing => existing.Id != version.Id)) { existingVersion.IsPublished = false; } - existingTemplate.TemplateVersions.Add(version); + var revision = CreateTemplateRevision(version.Id, jsonData, document.SchemaVersion, true, template.ModifiedBy); + _context.TemplateRevisions.Add(revision); } return SaveChanges(); @@ -157,6 +171,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository { return _context.TemplateVersions .AsNoTracking() + .Include(version => version.TemplateRevisions) .Where(version => version.TemplateId == templateId) .OrderByDescending(version => version.Created) .ToList(); @@ -166,6 +181,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository { return _context.TemplateVersions .AsNoTracking() + .Include(version => version.TemplateRevisions) .FirstOrDefault(version => version.TemplateId == templateId && version.Id == versionId); } @@ -173,9 +189,45 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository { return _context.TemplateVersions .AsNoTracking() + .Include(version => version.TemplateRevisions) .FirstOrDefault(version => version.TemplateId == templateId && version.IsPublished); } + public ICollection GetTemplateRevisions(Guid templateId, Guid versionId) + { + if (!_context.TemplateVersions.Any(version => version.TemplateId == templateId && version.Id == versionId)) + { + return new List(); + } + + return _context.TemplateRevisions + .AsNoTracking() + .Include(revision => revision.ConfigurationDefinitions) + .Where(revision => revision.TemplateVersionId == versionId) + .OrderByDescending(revision => revision.RevisionNumber) + .ToList(); + } + + public TemplateRevisionModel? GetTemplateRevisionById(Guid templateId, Guid versionId, Guid revisionId) + { + if (!_context.TemplateVersions.Any(version => version.TemplateId == templateId && version.Id == versionId)) + { + return null; + } + + return _context.TemplateRevisions + .AsNoTracking() + .Include(revision => revision.ConfigurationDefinitions) + .FirstOrDefault(revision => revision.TemplateVersionId == versionId && revision.Id == revisionId); + } + + public TemplateRevisionModel? GetCurrentTemplateRevision(Guid versionId) + { + return _context.TemplateRevisions + .AsNoTracking() + .FirstOrDefault(revision => revision.TemplateVersionId == versionId && revision.IsCurrent); + } + public bool AddTemplateVersion(Guid templateId, TemplateVersionModel version, bool publish) { if (!_context.Templates.Any(template => template.Id == templateId)) @@ -192,6 +244,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository version.SchemaVersion); version.SchemaVersion = document.SchemaVersion; version.SetJsonData(document.JsonData); + version.TemplateRevisions.Add(CreateTemplateRevision(version.Id, document.JsonData, document.SchemaVersion, publish, version.PublishedBy)); if (publish) { @@ -208,6 +261,42 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository return SaveChanges(); } + public bool AddTemplateRevision(Guid templateId, Guid versionId, TemplateRevisionModel revision, bool publish) + { + var version = _context.TemplateVersions + .Include(existing => existing.TemplateRevisions) + .FirstOrDefault(existing => existing.TemplateId == templateId && existing.Id == versionId); + + if (version == null) + { + return false; + } + + var document = ConfigurationDocumentValidator.NormalizeAndValidate( + revision.JsonData, + ConfigurationDocumentKind.Template, + revision.SchemaVersion); + + revision = CreateTemplateRevision(versionId, document.JsonData, document.SchemaVersion, publish, revision.PublishedBy); + + if (publish) + { + foreach (var existingRevision in _context.TemplateRevisions.Where(existing => existing.TemplateVersionId == versionId && existing.IsCurrent)) + { + existingRevision.IsCurrent = false; + existingRevision.IsPublished = false; + } + + version.SetJsonData(document.JsonData); + version.SchemaVersion = document.SchemaVersion; + version.PublishedAt = DateTime.UtcNow; + version.PublishedBy = revision.PublishedBy; + } + + _context.TemplateRevisions.Add(revision); + return SaveChanges(); + } + public bool PublishTemplateVersion(Guid templateId, Guid versionId, string? publishedBy) { var version = _context.TemplateVersions @@ -226,6 +315,13 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository version.IsPublished = true; version.PublishedAt = DateTime.UtcNow; version.PublishedBy = string.IsNullOrWhiteSpace(publishedBy) ? "System" : publishedBy; + var currentRevision = _context.TemplateRevisions.FirstOrDefault(revision => revision.TemplateVersionId == version.Id && revision.IsCurrent); + if (currentRevision != null) + { + currentRevision.IsPublished = true; + currentRevision.PublishedAt = DateTime.UtcNow; + currentRevision.PublishedBy = version.PublishedBy; + } var template = _context.Templates.FirstOrDefault(existing => existing.Id == templateId); if (template != null) @@ -266,7 +362,82 @@ namespace Microsoft.SelfService.Portal.Core.API.Repository } template.Version = publishedVersion.Version; - template.JSONData = publishedVersion.JsonData; + var currentRevision = publishedVersion.TemplateRevisions?.FirstOrDefault(revision => revision.IsCurrent); + template.JSONData = currentRevision?.JsonData ?? publishedVersion.JsonData; + } + + private TemplateRevisionModel CreateTemplateRevision(Guid templateVersionId, string jsonData, string schemaVersion, bool publish, string? publishedBy) + { + var revision = new TemplateRevisionModel + { + Id = Guid.NewGuid(), + TemplateVersionId = templateVersionId, + RevisionNumber = GetNextRevisionNumber(templateVersionId), + SchemaVersion = schemaVersion, + IsCurrent = true, + IsPublished = publish, + PublishedAt = publish ? DateTime.UtcNow : null, + PublishedBy = publishedBy ?? "System" + }; + revision.SetJsonData(jsonData); + + foreach (var existingRevision in _context.TemplateRevisions.Where(existing => existing.TemplateVersionId == templateVersionId && existing.IsCurrent)) + { + existingRevision.IsCurrent = false; + } + + foreach (var definition in ExtractConfigurationDefinitions(revision.Id, jsonData)) + { + revision.ConfigurationDefinitions.Add(definition); + } + + return revision; + } + + private int GetNextRevisionNumber(Guid templateVersionId) + { + return (_context.TemplateRevisions + .Where(revision => revision.TemplateVersionId == templateVersionId) + .Select(revision => (int?)revision.RevisionNumber) + .Max() ?? 0) + 1; + } + + private static IEnumerable ExtractConfigurationDefinitions(Guid revisionId, string jsonData) + { + using var document = JsonDocument.Parse(jsonData); + var root = document.RootElement; + + foreach (var definition in ExtractConfigurationDefinitions(revisionId, root, "parameters", ConfigurationDefinitionKinds.Parameter)) + { + yield return definition; + } + + foreach (var definition in ExtractConfigurationDefinitions(revisionId, root, "variables", ConfigurationDefinitionKinds.Variable)) + { + yield return definition; + } + } + + private static IEnumerable ExtractConfigurationDefinitions(Guid revisionId, JsonElement root, string propertyName, string kind) + { + if (!root.TryGetProperty(propertyName, out var definitions) || definitions.ValueKind != JsonValueKind.Object) + { + yield break; + } + + foreach (var property in definitions.EnumerateObject()) + { + var propertiesJson = property.Value.GetRawText(); + yield return new ConfigurationDefinitionModel + { + Id = Guid.NewGuid(), + TemplateRevisionId = revisionId, + Kind = kind, + Name = property.Name, + PropertiesJson = propertiesJson, + DefinitionHash = TemplateVersionModel.ComputeSha256(propertiesJson) + }; + } } private string GetUniqueVersionName(Guid templateId, string version) diff --git a/Services/ApiClientSecretHasher.cs b/Services/ApiClientSecretHasher.cs new file mode 100644 index 0000000..bb5483b --- /dev/null +++ b/Services/ApiClientSecretHasher.cs @@ -0,0 +1,58 @@ +using System.Security.Cryptography; + +namespace Microsoft.SelfService.Portal.Core.API.Services +{ + public static class ApiClientSecretHasher + { + private const int SaltSize = 16; + private const int KeySize = 32; + private const int DefaultIterations = 100_000; + + public static string HashSecret(string secret) + { + var salt = RandomNumberGenerator.GetBytes(SaltSize); + var hash = Rfc2898DeriveBytes.Pbkdf2(secret, salt, DefaultIterations, HashAlgorithmName.SHA256, KeySize); + + return string.Join( + '.', + "PBKDF2-SHA256", + DefaultIterations.ToString(), + Convert.ToBase64String(salt), + Convert.ToBase64String(hash)); + } + + public static bool VerifySecret(string secret, string storedHash) + { + var parts = storedHash.Split('.'); + if (parts.Length != 4 || parts[0] != "PBKDF2-SHA256") + { + return false; + } + + if (!int.TryParse(parts[1], out var iterations)) + { + return false; + } + + var salt = Convert.FromBase64String(parts[2]); + var expectedHash = Convert.FromBase64String(parts[3]); + var actualHash = Rfc2898DeriveBytes.Pbkdf2(secret, salt, iterations, HashAlgorithmName.SHA256, expectedHash.Length); + + return CryptographicOperations.FixedTimeEquals(actualHash, expectedHash); + } + + internal static string HashSecretForDemoData(string secret, string saltText) + { + var salt = System.Text.Encoding.UTF8.GetBytes(saltText); + Array.Resize(ref salt, SaltSize); + var hash = Rfc2898DeriveBytes.Pbkdf2(secret, salt, DefaultIterations, HashAlgorithmName.SHA256, KeySize); + + return string.Join( + '.', + "PBKDF2-SHA256", + DefaultIterations.ToString(), + Convert.ToBase64String(salt), + Convert.ToBase64String(hash)); + } + } +} diff --git a/Services/ApiTokenCreateResult.cs b/Services/ApiTokenCreateResult.cs new file mode 100644 index 0000000..5c7d143 --- /dev/null +++ b/Services/ApiTokenCreateResult.cs @@ -0,0 +1,13 @@ +namespace Microsoft.SelfService.Portal.Core.API.Services +{ + public class ApiTokenCreateResult + { + public string AccessToken { get; set; } = string.Empty; + + public string Jti { get; set; } = string.Empty; + + public DateTime IssuedAt { get; set; } + + public DateTime ExpiresAt { get; set; } + } +} diff --git a/Services/ApiTokenService.cs b/Services/ApiTokenService.cs new file mode 100644 index 0000000..4a2649a --- /dev/null +++ b/Services/ApiTokenService.cs @@ -0,0 +1,162 @@ +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; +using System.Text.Json; +using Microsoft.IdentityModel.Tokens; +using Microsoft.SelfService.Portal.Core.API.Models; + +namespace Microsoft.SelfService.Portal.Core.API.Services +{ + public class ApiTokenService + { + private readonly IConfiguration _configuration; + + public ApiTokenService(IConfiguration configuration) + { + _configuration = configuration; + } + + public int TokenLifetimeSeconds => + _configuration.GetValue("Authentication:OnPremClientCredentials:TokenLifetimeSeconds") ?? 3600; + + public string Issuer => + _configuration["Authentication:OnPremClientCredentials:Issuer"] ?? "Microsoft.SelfService.Portal.Core.API"; + + public string Audience => + _configuration["Authentication:OnPremClientCredentials:Audience"] ?? "Microsoft.SelfService.Portal.Core.API"; + + public ApiTokenCreateResult CreateAccessToken(ApiClientModel client, IReadOnlyCollection scopes) + { + return CreateAccessToken(client.ClientId, client.ClientId, scopes); + } + + public ApiTokenCreateResult CreateAccessToken(string subject, string? clientId, IReadOnlyCollection scopes) + { + var signingKey = GetSigningKey(); + var credentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256); + var now = DateTime.UtcNow; + var jti = Guid.NewGuid().ToString("N"); + var expiresAt = now.AddSeconds(TokenLifetimeSeconds); + + var claims = new List + { + new(JwtRegisteredClaimNames.Sub, subject), + new(JwtRegisteredClaimNames.Jti, jti) + }; + + if (!string.IsNullOrWhiteSpace(clientId)) + { + claims.Add(new Claim("client_id", clientId)); + } + + foreach (var scope in scopes) + { + claims.Add(new Claim("scope", scope)); + } + + var token = new JwtSecurityToken( + issuer: Issuer, + audience: Audience, + claims: claims, + notBefore: now, + expires: expiresAt, + signingCredentials: credentials); + + return new ApiTokenCreateResult + { + AccessToken = new JwtSecurityTokenHandler().WriteToken(token), + Jti = jti, + IssuedAt = now, + ExpiresAt = expiresAt + }; + } + + public IReadOnlyCollection ReadClientScopes(ApiClientModel client) + { + if (string.IsNullOrWhiteSpace(client.ScopesJson)) + { + return Array.Empty(); + } + + return JsonSerializer.Deserialize(client.ScopesJson) ?? Array.Empty(); + } + + public IReadOnlyCollection ResolveRequestedScopes(ApiClientModel client, string? requestedScope) + { + var allowedScopes = ReadClientScopes(client); + if (string.IsNullOrWhiteSpace(requestedScope)) + { + return allowedScopes; + } + + var requestedScopes = requestedScope + .Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToArray(); + + if (requestedScopes.Any(scope => !allowedScopes.Contains(scope, StringComparer.OrdinalIgnoreCase))) + { + throw new InvalidOperationException("Requested scope is not allowed for this client."); + } + + return requestedScopes; + } + + public IReadOnlyCollection ResolveRequestedUserScopes(string? requestedScope) + { + if (string.IsNullOrWhiteSpace(requestedScope)) + { + throw new InvalidOperationException("At least one scope is required."); + } + + var allowedScopes = ReadAllowedTokenScopes(); + var requestedScopes = requestedScope + .Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToArray(); + + if (requestedScopes.Length == 0) + { + throw new InvalidOperationException("At least one scope is required."); + } + + if (requestedScopes.Any(scope => !allowedScopes.Contains(scope, StringComparer.OrdinalIgnoreCase))) + { + throw new InvalidOperationException("Requested scope is not allowed."); + } + + return requestedScopes; + } + + public IReadOnlyCollection ReadAllowedTokenScopes() + { + var configuredScopes = _configuration.GetSection("Authentication:OnPremClientCredentials:AllowedTokenScopes").Get(); + if (configuredScopes != null && configuredScopes.Length > 0) + { + return configuredScopes; + } + + return + [ + "deployment.read", + "deployment.write", + "queue.process", + "template.read", + "credential.resolve", + "token.manage", + "token.admin" + ]; + } + + public SymmetricSecurityKey GetSigningKey() + { + var signingKey = _configuration["Authentication:OnPremClientCredentials:SigningKey"]; + if (string.IsNullOrWhiteSpace(signingKey)) + { + signingKey = "DevelopmentOnly-OnPremClientCredentials-SigningKey-ChangeMe"; + } + + return new SymmetricSecurityKey(Encoding.UTF8.GetBytes(signingKey)); + } + } +} diff --git a/Services/QueueJobService.cs b/Services/QueueJobService.cs index fe57009..7b0eff6 100644 --- a/Services/QueueJobService.cs +++ b/Services/QueueJobService.cs @@ -55,13 +55,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Services return queueJob.Id; } - public Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection targetIds, string jsonData) + public Guid EnqueueDeploymentRequest(Guid deploymentGroupId, ICollection targetIds, string jsonData, Guid? deploymentArtifactId = null) { - var deploymentDocument = ConfigurationDocumentValidator.NormalizeAndValidate( - jsonData, - ConfigurationDocumentKind.DeploymentOverride); - jsonData = deploymentDocument.JsonData; - var deploymentGroup = _context.DeploymentGroups .AsNoTracking() .Include(group => group.Template) @@ -80,6 +75,39 @@ namespace Microsoft.SelfService.Portal.Core.API.Services throw new InvalidOperationException("DeploymentGroup does not exist."); } + var currentArtifact = deploymentArtifactId.HasValue + ? _context.DeploymentArtifacts + .AsNoTracking() + .FirstOrDefault(artifact => + artifact.Id == deploymentArtifactId.Value + && artifact.DeploymentGroupId == deploymentGroupId + && !artifact.IsStale) + : _context.DeploymentArtifacts + .AsNoTracking() + .Where(artifact => + artifact.DeploymentGroupId == deploymentGroupId + && artifact.ArtifactType == DeploymentArtifactTypes.ResolvedConfigurationData + && !artifact.IsStale) + .OrderByDescending(artifact => artifact.Created) + .FirstOrDefault(); + + if (deploymentArtifactId.HasValue && currentArtifact == null) + { + throw new InvalidOperationException("Deployment artifact does not exist or is stale."); + } + + if (currentArtifact != null) + { + jsonData = currentArtifact.DeploymentJson; + } + else + { + var deploymentDocument = ConfigurationDocumentValidator.NormalizeAndValidate( + jsonData, + ConfigurationDocumentKind.DeploymentOverride); + jsonData = deploymentDocument.JsonData; + } + var primaryTemplateSelection = deploymentGroup.TemplateSelections .OrderBy(selection => selection.SortOrder) .FirstOrDefault(); @@ -156,6 +184,7 @@ namespace Microsoft.SelfService.Portal.Core.API.Services { selection.Id, selection.TemplateVersionId, + selection.TemplateRevisionId, TemplateId = selection.TemplateVersion.TemplateId, TemplateName = selection.TemplateVersion.Template.Name, selection.TemplateVersion.Version, @@ -176,6 +205,8 @@ namespace Microsoft.SelfService.Portal.Core.API.Services assignment.NodeDataJson }), TargetIds = resolvedTargetIds, + DeploymentArtifactId = currentArtifact?.Id, + DeploymentJson = currentArtifact?.DeploymentJson, JsonData = jsonData, TargetCount = resolvedTargetIds.Count, Created = DateTime.UtcNow diff --git a/appsettings.json b/appsettings.json index d6527c3..aca2c95 100644 --- a/appsettings.json +++ b/appsettings.json @@ -6,6 +6,23 @@ } }, "AllowedHosts": "*", + "Authentication": { + "OnPremClientCredentials": { + "Issuer": "Microsoft.SelfService.Portal.Core.API", + "Audience": "Microsoft.SelfService.Portal.Core.API", + "SigningKey": "DevelopmentOnly-OnPremClientCredentials-SigningKey-ChangeMe", + "TokenLifetimeSeconds": 3600, + "AllowedTokenScopes": [ + "deployment.read", + "deployment.write", + "queue.process", + "template.read", + "credential.resolve", + "token.manage", + "token.admin" + ] + } + }, "ConnectionStrings": { "Context": "Server=.;Database=SSP;TrustServerCertificate=True;Encrypt=False;Trusted_Connection=True" }