Merge pull request 'visualbasic/migration' (#1) from visualbasic/migration into main

Reviewed-on: #1
This commit is contained in:
jorge.burgos 2025-02-07 17:30:54 +00:00
commit 549edfeb21
111 changed files with 257757 additions and 594 deletions

23
.gitignore vendored
View File

@ -79,3 +79,26 @@ UpgradeLog*.XML
UpgradeLog*.htm UpgradeLog*.htm
ServiceFabricBackup/ ServiceFabricBackup/
*.rptproj.bak *.rptproj.bak
# Code Coverage Files
*.coverage
coverage.json
coverage.info
coverage.xml
*.coveragexml
.coverage*
# Test Results
TestResults/
[Tt]est[Rr]esult*/
*.trx
*.vstest.*
# Coverage Reports
coverage-report/
coverage/
**/coverage/
reports/
lcov-report/
htmlcov/
.nyc_output/

133
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,133 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate Code Coverage Report",
"group": {
"kind": "test",
"isDefault": true
},
"command": "powershell",
"type": "shell",
"args": [
"-Command",
"& { dotnet test ./vb-migration/Strata.Base.Internal.Tests/Strata.Base.Internal.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./vb-migration/Strata.Base.Internal.Tests/TestResults/*/coverage.cobertura.xml; if ($?) { reportgenerator -reports:./vb-migration/Strata.Base.Internal.Tests/TestResults/*/coverage.cobertura.xml -targetdir:coverage-report -reporttypes:Html; Start-Process coverage-report/index.html } }"
],
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "docker-build",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"build",
"-t",
"st-database",
"./ef-migration/infrastructure/sql-server"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "docker-run",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"run",
"-d",
"-p",
"1433:1433",
"--name",
"st-db",
"st-database"
],
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "docker-stop",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"stop",
"st-db"
],
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "docker-remove",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"rm",
"st-db"
],
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "docker-logs",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"logs",
"st-db"
],
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "docker-status",
"type": "shell",
"command": "wsl",
"args": [
"docker",
"ps",
"-a",
"--filter",
"name=st-db",
"--format",
"\"{{.Names}} - {{.Status}}\""
],
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
}
]
}

View File

@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Strata.Code.DataAccess", "src\Strata.Code.DataAccess\Strata.Code.DataAccess.csproj", "{C27AA99E-EEC0-41FE-B949-F4EEED1F3952}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Strata.Code.Business", "src\Strata.Code.Business\Strata.Code.Business.csproj", "{478E3F10-2B5C-4D40-BE53-327E5B2AD0AC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C4F5F2DA-7191-4ACE-8EC4-5715C1E9388E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Strata.Code.Web", "src\Strata.Code.Web\Strata.Code.Web.csproj", "{120D37EF-20DC-492B-AB2B-8A887627A211}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C27AA99E-EEC0-41FE-B949-F4EEED1F3952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C27AA99E-EEC0-41FE-B949-F4EEED1F3952}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C27AA99E-EEC0-41FE-B949-F4EEED1F3952}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C27AA99E-EEC0-41FE-B949-F4EEED1F3952}.Release|Any CPU.Build.0 = Release|Any CPU
{478E3F10-2B5C-4D40-BE53-327E5B2AD0AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{478E3F10-2B5C-4D40-BE53-327E5B2AD0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{478E3F10-2B5C-4D40-BE53-327E5B2AD0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{478E3F10-2B5C-4D40-BE53-327E5B2AD0AC}.Release|Any CPU.Build.0 = Release|Any CPU
{120D37EF-20DC-492B-AB2B-8A887627A211}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{120D37EF-20DC-492B-AB2B-8A887627A211}.Debug|Any CPU.Build.0 = Debug|Any CPU
{120D37EF-20DC-492B-AB2B-8A887627A211}.Release|Any CPU.ActiveCfg = Release|Any CPU
{120D37EF-20DC-492B-AB2B-8A887627A211}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,171 @@
# SQL Server Container Setup
This repository contains a containerized SQL Server setup with initialization scripts and configuration options.
## Prerequisites
- Docker and Docker Compose installed on your system
- At least 2GB of available memory for SQL Server
- Port 1433 available on your host machine
## Quick Start
### Starting the Container
With environment variables:
```bash
docker-compose -f docker-compose-infra.yml up -d
```
Without environment variables (uses defaults):
```bash
ACCEPT_EULA=Y MSSQL_PID=Express SA_PASSWORD=YourStrong@Passw0rd docker-compose -f docker-compose-infra.yml up -d
```
### Building the Container
```bash
docker-compose -f docker-compose-infra.yml build
```
### Stopping and Removing the Container
Stop the container:
```bash
docker-compose -f docker-compose-infra.yml down
```
Remove container and persistent volume:
```bash
docker-compose -f docker-compose-infra.yml down -v
```
## Configuration
### Environment Variables
| Variable | Description | Default Value |
|----------|-------------|---------------|
| SA_PASSWORD | SQL Server SA user password | YourStrong@Passw0rd |
| DROP_DATABASE | Flag to drop existing database on startup | false |
| ACCEPT_EULA | Accept SQL Server EULA | Y |
| MSSQL_PID | SQL Server edition | Express |
### Ports
- **1433**: SQL Server port (mapped to host machine)
### Volumes
- **sqlserver_data**: Persistent storage for SQL Server data
- **./logs**: Container logs directory
## Setup Process
The container uses `setup.sh` as its entry point, which handles the complete initialization process:
### Startup Sequence
1. Starts SQL Server in the background
2. Waits up to 50 seconds for SQL Server to be ready
3. Performs health checks using sqlcmd
4. Handles database initialization or reset based on environment variables
### Database Management
- Checks for existing database (`st-database`)
- Drops database if DROP_DATABASE=true
- Verifies database initialization status by checking for key tables
- Runs initialization scripts only if needed
### Script Execution Order
1. Runs `init.sql` to create the database and schemas
2. Executes all SQL scripts in the `schemas` directory
3. Handles GO statements automatically with proper spacing
4. Maintains container operation after setup
### Error Handling
- Provides detailed logging for each step
- Continues despite non-critical script errors
- Exits with proper status codes for critical failures
## Database Initialization
The container automatically:
1. Initializes SQL Server
2. Creates the database 'st-database' if it doesn't exist
3. Creates the following schemas:
- fp
- fw
- int
- ob
### Database Reset
To reset the database:
```bash
DROP_DATABASE=true docker-compose -f docker-compose-infra.yml up -d
```
## Extract Scripts
The container includes several utility scripts for managing database objects:
### extract_tables.sh
- Extracts table definitions into separate files
- Usage: `./extract_tables.sh <sql_file>`
- Output directory: `sql_objects/tables`
### extract_constraints.sh
- Extracts table constraints and foreign keys
- Usage: `./extract_constraints.sh <sql_file>`
- Output directories:
- `sql_objects/constraints`
- `sql_objects/foreign_keys`
### extract_indexes.sh
- Extracts index definitions
- Usage: `./extract_indexes.sh <sql_file>`
- Output directories:
- `sql_objects/indexes/clustered`
- `sql_objects/indexes/nonclustered`
- `sql_objects/indexes/unique_clustered`
### extract_views.sh
- Extracts view definitions
- Usage: `./extract_views.sh <sql_file>`
- Output directory: `sql_objects/views`
### extract_procedures.sh
- Extracts stored procedure definitions
- Usage: `./extract_procedures.sh <sql_file>`
- Output directory: `sql_objects/procedures`
## Resource Limits
The container is configured with the following resource constraints:
- Memory: 2GB minimum (required for SQL Server)
- CPU: Limited to 1 core, with 0.25 core reserved
## Health Checks
The container includes a health check that:
- Runs every 10 seconds
- Verifies SQL Server connectivity
- Allows 10 retries before marking as unhealthy
- Has a 10-second startup grace period
## Troubleshooting
If the container fails to start:
1. Ensure at least 2GB of memory is available
2. Check the logs directory for detailed error messages
3. Verify the port 1433 is not in use by another service
4. Check SQL Server logs: `docker logs sql1`
5. Verify SQL Server is running: `docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT @@VERSION"`
The container will automatically restart unless explicitly stopped.

View File

@ -0,0 +1,37 @@
version: '3.8'
services:
sqlserver:
build:
context: .
dockerfile: sql-server/Dockerfile
container_name: sql1
ports:
- "1433:1433"
environment:
- ACCEPT_EULA=Y
- MSSQL_PID=Express
- SA_PASSWORD=YourStrong@Passw0rd
- DROP_DATABASE=${DROP_DATABASE:-false}
volumes:
- sqlserver_data:/var/opt/mssql
- ./logs:/usr/src/app/logs
deploy:
resources:
limits:
memory: 2G # Minimum required for SQL Server
cpus: '1.0' # Limit to 1 CPU core
reservations:
memory: 2G # Must reserve 2GB minimum for SQL Server to start
cpus: '0.25' # Reserve quarter of a CPU core
restart: unless-stopped
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
interval: 10s
timeout: 3s
retries: 10
start_period: 10s
volumes:
sqlserver_data:
driver: local

View File

@ -0,0 +1,46 @@
# Use SQL Server 2022 Express for smaller footprint
FROM mcr.microsoft.com/mssql/server:2022-latest
# Set required environment variables
ENV ACCEPT_EULA=Y \
MSSQL_PID=Express \
SA_PASSWORD=YourStrong@Passw0rd \
DROP_DATABASE=false \
PATH="/opt/mssql-tools/bin:${PATH}"
# Install sqlcmd utility and other required packages
USER root
RUN apt-get update && \
apt-get install -y wget software-properties-common gnupg2 && \
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2022.list)" && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create app directory and schemas subdirectory in one layer
WORKDIR /usr/src/app
RUN mkdir -p schemas && \
mkdir -p sql_objects/{tables,constraints,foreign_keys,indexes/{clustered,nonclustered,unique_clustered},views,procedures} && \
chown -R mssql:mssql /usr/src/app && \
chmod -R 755 /usr/src/app
# Copy all SQL files and scripts in a single layer to reduce image size
COPY ./sql-server/schemas/*.sql ./schemas/
COPY ./sql-server/init.sql ./
COPY ./sql-server/setup.sh ./
COPY ./sql-server/extract_*.sh ./
# Fix line endings and make all scripts executable
RUN sed -i 's/\r$//' setup.sh && \
sed -i 's/\r$//' extract_*.sh && \
chmod +x setup.sh && \
chmod +x extract_*.sh && \
chown -R mssql:mssql /usr/src/app
# Switch back to mssql user
USER mssql
# Start SQL Server with our setup script
CMD /bin/bash ./setup.sh

View File

@ -0,0 +1,120 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
SQL_FILE="$1"
BASE_DIR="sql_objects"
# Create directory structure
mkdir -p "$BASE_DIR"/{constraints,foreign_keys}
# Ensure proper permissions
chmod -R 755 "$BASE_DIR"
# Function to clean filename
clean_filename() {
# Remove brackets, convert dots and spaces to underscores, remove parentheses
echo "$1" | sed 's/\[\|\]//g' | tr '.' '_' | tr ' ' '_' | sed 's/[()]//g' | sed 's/__*/_/g' | sed 's/_$//'
}
# Function to extract table name from constraint
extract_table_name() {
echo "$1" | sed -nE 's/.*ALTER[[:space:]]+TABLE[[:space:]]+\[?([^]]+)\]?.*/\1/p'
}
# Function to extract constraint name
extract_constraint_name() {
echo "$1" | sed -nE 's/.*CONSTRAINT[[:space:]]+\[?([^]]+)\]?.*/\1/p'
}
# Function to process each ALTER TABLE statement
process_statement() {
local line="$1"
local table_name=$(extract_table_name "$line")
local constraint_name=$(extract_constraint_name "$line")
# Skip if we couldn't extract table or constraint name
if [ -z "$table_name" ] || [ -z "$constraint_name" ]; then
return
fi
# Determine if it's a foreign key
if echo "$line" | grep -i "FOREIGN[[:space:]]\+KEY" >/dev/null; then
output_dir="$BASE_DIR/foreign_keys"
else
output_dir="$BASE_DIR/constraints"
fi
# Clean filename and save
clean_name=$(clean_filename "${table_name}_${constraint_name}")
output_file="${output_dir}/${clean_name}.sql"
echo "$line" > "$output_file"
echo "Created: $output_file"
}
# Main processing function
extract_constraints() {
local current_statement=""
# Read the file line by line
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines
if [ -z "${line// }" ]; then
continue
fi
# If line starts with ALTER TABLE, it's a new statement
if echo "$line" | grep -i "^[[:space:]]*ALTER[[:space:]]\+TABLE" >/dev/null; then
current_statement="$line"
# If GO is on the same line
if echo "$line" | grep -i "GO[[:space:]]*$" >/dev/null; then
# Remove GO and process
current_statement=$(echo "$current_statement" | sed 's/[[:space:]]*GO[[:space:]]*$//')
process_statement "$current_statement"
current_statement=""
fi
continue
fi
# If we find GO, process the current statement
if echo "$line" | grep -i "^[[:space:]]*GO[[:space:]]*$" >/dev/null; then
if [ -n "$current_statement" ]; then
process_statement "$current_statement"
current_statement=""
fi
continue
fi
# Add line to current statement if we're collecting one
if [ -n "$current_statement" ]; then
current_statement+=" $line"
fi
done
}
# Remove comment lines starting with -- and process
echo "Extracting constraints and foreign keys..."
sed 's/--.*$//' "$SQL_FILE" | extract_constraints
echo "Constraints and foreign keys have been saved in $BASE_DIR/constraints and $BASE_DIR/foreign_keys"
# Count and list files
echo -e "\nFile counts:"
for dir in constraints foreign_keys; do
count=$(ls -1 "$BASE_DIR/$dir"/*.sql 2>/dev/null | wc -l || echo 0)
echo "$dir: $count files"
echo -e "\nExtracted ${dir}:"
if [ "$count" -gt 0 ]; then
for file in "$BASE_DIR/$dir"/*.sql; do
if [ -f "$file" ]; then
echo "- $(basename "$file")"
fi
done
fi
done

View File

@ -0,0 +1,174 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
SQL_FILE="$1"
BASE_DIR="sql_objects"
# Create directory structure
mkdir -p "$BASE_DIR/indexes/clustered"
mkdir -p "$BASE_DIR/indexes/nonclustered"
mkdir -p "$BASE_DIR/indexes/unique_clustered"
# Ensure proper permissions
chmod -R 755 "$BASE_DIR"
# Function to clean filename
clean_filename() {
# Remove brackets, convert dots and spaces to underscores, remove parentheses
echo "$1" | sed 's/\[\|\]//g' | tr '.' '_' | tr ' ' '_' | sed 's/[()]//g' | sed 's/__*/_/g' | sed 's/_$//'
}
# Function to determine if line is start of an index creation statement
is_index_start() {
# Matches with UNIQUE, CLUSTERED/NONCLUSTERED keywords
echo "$1" | grep -qiE "CREATE[[:space:]]*(UNIQUE[[:space:]]+)?(CLUSTERED|NONCLUSTERED)?[[:space:]]*INDEX[[:space:]]+\[?[^]]+\]?[[:space:]]+ON"
}
# Function to extract table name
extract_table_name() {
# More aggressive extraction of table name
echo "$1" | sed -nE 's/.*CREATE[[:space:]]*(UNIQUE[[:space:]]+)?(CLUSTERED|NONCLUSTERED)?[[:space:]]*INDEX[[:space:]]+\[?[^]]+\]?[[:space:]]+ON[[:space:]]+(\[[^]]+\](\.[^]]+)?).*/\3/p' | tr -d '[]'
}
# Function to extract index name
extract_index_name() {
# Extract index name, handling various formats
echo "$1" | sed -nE 's/.*CREATE[[:space:]]*(UNIQUE[[:space:]]+)?(CLUSTERED|NONCLUSTERED)?[[:space:]]*INDEX[[:space:]]+\[?([^]]+)\]?.*/\3/p' | tr -d '[]'
}
# Function to determine index type
get_index_type() {
local line="$1"
local is_unique=$(echo "$line" | grep -qiE "CREATE[[:space:]]+UNIQUE" && echo true || echo false)
local is_clustered=$(echo "$line" | grep -qiE "CREATE[[:space:]]+CLUSTERED" && echo true || echo false)
local is_nonclustered=$(echo "$line" | grep -qiE "CREATE[[:space:]]+NONCLUSTERED" && echo true || echo false)
if $is_unique && $is_clustered; then
echo "unique_clustered"
elif $is_clustered; then
echo "clustered"
elif $is_nonclustered; then
echo "nonclustered"
else
echo "clustered" # Default to clustered if no type specified
fi
}
# Function to process each index statement
process_index() {
local line="$1"
local table_name=$(extract_table_name "$line")
local index_name=$(extract_index_name "$line")
local index_type=$(get_index_type "$line")
# Skip if we couldn't extract table or index name
if [ -z "$table_name" ] || [ -z "$index_name" ]; then
echo "Warning: Could not extract table or index name from:"
echo "$line"
return
fi
# Clean filename and save
clean_name=$(clean_filename "${table_name}_${index_name}")
output_dir="$BASE_DIR/indexes/$index_type"
output_file="${output_dir}/${clean_name}.sql"
# Trim whitespace and ensure semicolon at end
line=$(echo "$line" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
if [[ "$line" != *\; ]]; then
line="${line};"
fi
echo "$line" > "$output_file"
echo "Created: $output_file"
}
# Main processing function
extract_indexes() {
local current_statement=""
local capturing_index=false
# Disable case sensitivity
shopt -s nocasematch
# Read the file line by line
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines and pure comment lines
if [ -z "${line// }" ] || [[ "$line" =~ ^[[:space:]]*-- ]]; then
continue
fi
# Check for index start
if is_index_start "$line"; then
# Process previous statement if any
if [ -n "$current_statement" ] && $capturing_index; then
process_index "$current_statement"
fi
# Start new index statement
current_statement="$line"
capturing_index=true
# Check if GO is on the same line
if [[ "$line" =~ GO[[:space:]]*$ ]]; then
# Remove GO and process
current_statement=$(echo "$current_statement" | sed 's/[[:space:]]*GO[[:space:]]*$//')
process_index "$current_statement"
current_statement=""
capturing_index=false
fi
continue
fi
# If we're capturing an index
if $capturing_index; then
# Add line to current statement
current_statement+=" $line"
# Check for GO statement
if [[ "$line" =~ ^[[:space:]]*GO[[:space:]]*$ ]]; then
# Remove GO and process
current_statement=$(echo "$current_statement" | sed 's/[[:space:]]*GO[[:space:]]*$//; s/;[[:space:]]*$//')
process_index "$current_statement"
current_statement=""
capturing_index=false
fi
fi
done
# Process any remaining index statement
if [ -n "$current_statement" ] && $capturing_index; then
process_index "$current_statement"
fi
# Re-enable case sensitivity
shopt -u nocasematch
}
# Remove comment lines and process
echo "Extracting indexes..."
sed 's/--.*$//' "$SQL_FILE" | extract_indexes
echo "Indexes have been saved in $BASE_DIR/indexes"
# Count and list files
echo -e "\nFile counts:"
for index_type in clustered nonclustered unique_clustered; do
count=$(ls -1 "$BASE_DIR/indexes/$index_type"/*.sql 2>/dev/null | wc -l || echo 0)
echo "$index_type indexes: $count files"
if [ "$count" -gt 0 ]; then
echo -e "\nExtracted $index_type indexes:"
for file in "$BASE_DIR/indexes/$index_type"/*.sql; do
if [ -f "$file" ]; then
echo "- $(basename "$file")"
fi
done
echo
fi
done

View File

@ -0,0 +1,167 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
SQL_FILE="$1"
BASE_DIR="sql_objects"
# Create directory structure
mkdir -p "$BASE_DIR/procedures"
# Ensure proper permissions
chmod -R 755 "$BASE_DIR"
# Function to clean filename
clean_filename() {
# Remove brackets, convert dots and spaces to underscores, remove parentheses
echo "$1" | sed 's/\[\|\]//g' | tr '.' '_' | tr ' ' '_' | sed 's/[()]//g' | sed 's/__*/_/g' | sed 's/_$//'
}
# Function to extract procedure name
extract_procedure_name() {
# More flexible procedure name extraction
local name=$(echo "$1" | sed -nE 's/.*CREATE[[:space:]]+PROC(EDURE)?[[:space:]]+(\[[^]]+\](\.[^]]+)?|\S+).*/\2/pi' | tr -d '[]')
echo "$name"
}
# Function to extract schema name (if present)
extract_schema_name() {
# Extract schema name with more flexible matching
local schema=$(echo "$1" | sed -nE 's/.*CREATE[[:space:]]+PROC(EDURE)?[[:space:]]+\[?([^.]+)\.([^]]+)\]?.*/\2/pi')
if [ -z "$schema" ]; then
# Try alternative extraction
schema=$(echo "$1" | sed -nE 's/.*CREATE[[:space:]]+PROC(EDURE)?[[:space:]]+\[?([^]]+)\]?.*/\2/pi' | cut -d. -f1)
fi
if [ -z "$schema" ]; then
echo "dbo" # Default schema if not specified
else
echo "$schema" | tr -d '[]'
fi
}
# Function to process each procedure statement
process_procedure() {
local procedure_statement="$1"
local procedure_name=$(extract_procedure_name "$procedure_statement")
local schema_name=$(extract_schema_name "$procedure_statement")
# Skip if we couldn't extract procedure name
if [ -z "$procedure_name" ]; then
echo "Warning: Could not extract procedure name from:"
echo "$procedure_statement"
return
fi
# Clean filename and save
clean_name=$(clean_filename "${schema_name}_${procedure_name}")
output_file="$BASE_DIR/procedures/${clean_name}.sql"
# Trim whitespace and ensure semicolon at end if not already present
procedure_statement=$(echo "$procedure_statement" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
if [[ "$procedure_statement" != *\; ]]; then
procedure_statement="${procedure_statement};"
fi
# Save the procedure
echo "$procedure_statement" > "$output_file"
echo "Created: $output_file"
}
# Main processing function
extract_procedures() {
local current_statement=""
local capturing_procedure=false
local depth=0
# Disable case sensitivity
shopt -s nocasematch
# Read the file line by line
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines and pure comment lines
if [ -z "${line// }" ] || [[ "$line" =~ ^[[:space:]]*-- ]]; then
continue
fi
# Check for procedure start (more flexible)
if [[ "$line" =~ CREATE[[:space:]]+PROC(EDURE)?[[:space:]]+ ]]; then
# Process previous statement if any
if [ -n "$current_statement" ] && $capturing_procedure; then
process_procedure "$current_statement"
fi
# Start new procedure statement
current_statement="$line"
capturing_procedure=true
depth=0
# Check if GO is on the same line
if [[ "$line" =~ GO[[:space:]]*$ ]]; then
# Remove GO and process
current_statement=$(echo "$current_statement" | sed 's/[[:space:]]*GO[[:space:]]*$//')
process_procedure "$current_statement"
current_statement=""
capturing_procedure=false
fi
continue
fi
# If we're capturing a procedure
if $capturing_procedure; then
# Track BEGIN/END blocks to ensure we capture the entire procedure
if [[ "$line" =~ BEGIN ]]; then
((depth++))
fi
if [[ "$line" =~ END ]]; then
((depth--))
fi
# Add line to current statement
current_statement+=" $line"
# Check for GO statement or end of procedure
if [[ "$line" =~ ^[[:space:]]*GO[[:space:]]*$ ]] ||
([[ "$line" =~ END ]] && [[ $depth -le 0 ]]); then
# Remove GO and process
current_statement=$(echo "$current_statement" | sed 's/[[:space:]]*GO[[:space:]]*$//; s/;[[:space:]]*$//')
process_procedure "$current_statement"
current_statement=""
capturing_procedure=false
depth=0
fi
fi
done
# Process any remaining procedure statement
if [ -n "$current_statement" ] && $capturing_procedure; then
process_procedure "$current_statement"
fi
# Re-enable case sensitivity
shopt -u nocasematch
}
# Remove comment lines and process
echo "Extracting stored procedures..."
sed 's/--.*$//' "$SQL_FILE" | extract_procedures
echo "Stored procedures have been saved in $BASE_DIR/procedures"
# Count and list files
count=$(ls -1 "$BASE_DIR/procedures"/*.sql 2>/dev/null | wc -l || echo 0)
echo -e "\nTotal stored procedures extracted: $count"
if [ "$count" -gt 0 ]; then
echo -e "\nExtracted stored procedures:"
for file in "$BASE_DIR/procedures"/*.sql; do
if [ -f "$file" ]; then
echo "- $(basename "$file")"
fi
done
fi

View File

@ -0,0 +1,150 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
SQL_FILE="$1"
BASE_DIR="/usr/src/app/sql_objects" # Use absolute path
# Create directory structure with proper permissions
echo "Creating directory structure at $BASE_DIR/tables"
mkdir -p "$BASE_DIR/tables"
chmod -R 777 "$BASE_DIR" # Give full permissions for testing
# Function to check if table is temporary
is_temporary_table() {
local table_name="$1"
if echo "$table_name" | grep -iE "^(#|tmp_|temp_|temporary_|import_|viewimport_)" >/dev/null; then
return 0 # true in bash
else
return 1 # false in bash
fi
}
# Function to clean filename
clean_filename() {
# Remove brackets, convert dots and spaces to underscores, remove parentheses
echo "$1" | sed 's/\[\|\]//g' | tr '.' '_' | tr ' ' '_' | sed 's/[()]//g' | sed 's/__*/_/g' | sed 's/_$//'
}
# Function to extract table name with better schema handling
extract_table_name() {
local create_statement="$1"
# First, try to match schema.table pattern with brackets
local table_name=$(echo "$create_statement" | sed -nE 's/.*CREATE[[:space:]]+TABLE[[:space:]]+\[([^]]+)\]\.\[([^]]+)\].*/\1.\2/p')
if [ -z "$table_name" ]; then
# Try to match schema.table pattern without brackets
table_name=$(echo "$create_statement" | sed -nE 's/.*CREATE[[:space:]]+TABLE[[:space:]]+([^.[:space:]]+)\.([^.[:space:]]+).*/\1.\2/p')
fi
if [ -z "$table_name" ]; then
# Try to match just table name with brackets
table_name=$(echo "$create_statement" | sed -nE 's/.*CREATE[[:space:]]+TABLE[[:space:]]+\[([^]]+)\].*/\1/p')
fi
if [ -z "$table_name" ]; then
# Try to match just table name without brackets
table_name=$(echo "$create_statement" | sed -nE 's/.*CREATE[[:space:]]+TABLE[[:space:]]+([^[:space:]]+).*/\1/p')
fi
echo "$table_name"
}
# Function to process each CREATE TABLE statement
process_table() {
local table_statement="$1"
local table_name=$(extract_table_name "$table_statement")
# Debug output
echo "Extracted table name: $table_name"
# Skip if we couldn't extract table name
if [ -z "$table_name" ]; then
echo "Warning: Could not extract table name from statement:"
echo "$table_statement" | head -n 1
return
fi
# Check if it's a temporary table
if is_temporary_table "$table_name"; then
echo "Skipping temporary table: $table_name"
return
fi
# Clean filename and create full path
clean_name=$(clean_filename "${table_name}")
output_file="$BASE_DIR/tables/${clean_name}.sql"
echo "Attempting to write to: $output_file"
# Create the file with proper error handling
if ! echo "$table_statement" > "$output_file" 2>/dev/null; then
echo "Error writing to $output_file"
echo "Current permissions:"
ls -la "$BASE_DIR/tables"
return 1
fi
echo "Successfully created: $output_file"
}
# Main processing function
extract_tables() {
local current_statement=""
local capture_table=false
# Read the file line by line
while IFS= read -r line || [ -n "$line" ]; do
# Skip empty lines and pure comment lines
if [ -z "${line// }" ] || [[ "$line" =~ ^[[:space:]]*-- ]]; then
continue
fi
# Check for CREATE TABLE statement
if echo "$line" | grep -i "CREATE[[:space:]]\+TABLE" > /dev/null; then
# Debug output
echo "Found CREATE TABLE statement: $line"
local table_name=$(extract_table_name "$line")
echo "Extracted table name from line: $table_name"
if ! is_temporary_table "$table_name"; then
capture_table=true
current_statement="$line"
else
echo "Skipping temporary table: $table_name"
fi
continue
fi
# If we're capturing a table
if $capture_table; then
current_statement+=$'\n'"$line"
# If we find a GO statement, process the table
if echo "$line" | grep -i "^[[:space:]]*GO[[:space:]]*$" > /dev/null; then
process_table "$current_statement"
capture_table=false
current_statement=""
fi
fi
done < "$SQL_FILE"
# Process any remaining table statement
if $capture_table && [ -n "$current_statement" ]; then
process_table "$current_statement"
fi
}
# Remove comment lines and process
echo "Starting table extraction from $SQL_FILE to $BASE_DIR/tables"
echo "Current working directory: $(pwd)"
echo "Directory contents before extraction:"
ls -la "$BASE_DIR/tables"
sed 's/--.*$//' "$SQL_FILE" | extract_tables
echo "Extraction completed. Directory contents after extraction:"
ls -la "$BASE_DIR/tables"

View File

@ -0,0 +1,127 @@
#!/bin/bash
# Check if input file is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <sql_file>"
exit 1
fi
SQL_FILE="$1"
BASE_DIR="sql_objects"
# Create directory structure
mkdir -p "$BASE_DIR/views"
# Ensure proper permissions
chmod -R 755 "$BASE_DIR"
# Function to clean filename
clean_filename() {
# Remove brackets, convert dots and spaces to underscores, remove parentheses
echo "$1" | sed 's/\[\|\]//g' | tr '.' '_' | tr ' ' '_' | sed 's/[()]//g' | sed 's/__*/_/g' | sed 's/_$//'
}
# Function to extract view name
extract_view_name() {
# More flexible pattern for extracting view name
echo "$1" | sed -n 's/.*[Cc][Rr][Ee][Aa][Tt][Ee][[:space:]]*[Vv][Ii][Ee][Ww][[:space:]]*\[\([^]]*\)\]\.\[\([^]]*\)\].*/\1.\2/p'
}
# Function to clean the input line
clean_input_line() {
# Remove any leading/trailing whitespace and normalize spaces
echo "$1" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr -s ' '
}
# Function to process each CREATE VIEW statement
process_view() {
local current_object="$1"
local view_name="$2"
# Skip if we couldn't extract view name
if [ -z "$view_name" ]; then
echo "Warning: Could not extract view name from statement:"
echo "$current_object" | head -n 1
# Try to extract with a more lenient pattern
view_name=$(echo "$current_object" | head -n 1 | grep -io '\[int\]\.\[[^]]*\]' | head -n 1 | sed 's/\[\|\]//g')
if [ -z "$view_name" ]; then
return
fi
fi
# Clean filename and save
clean_name=$(clean_filename "$view_name")
output_file="$BASE_DIR/views/${clean_name}.sql"
echo "$current_object" > "$output_file"
echo "Created: $output_file (from view: $view_name)"
}
# Main processing function
extract_views() {
local current_object=""
local capture_view=false
local view_name=""
# Read the file line by line
while IFS= read -r line || [ -n "$line" ]; do
# Clean the line
line=$(clean_input_line "$line")
# Skip empty lines at the start of an object
if [ -z "$line" ] && [ -z "$current_object" ]; then
continue
fi
# Check if we've found a CREATE VIEW statement (case insensitive and flexible)
if echo "$line" | grep -iE "[[:space:]]*[Cc][Rr][Ee][Aa][Tt][Ee][[:space:]]+[Vv][Ii][Ee][Ww]" >/dev/null; then
capture_view=true
current_object="$line"
view_name=$(extract_view_name "$line")
if [ -n "$view_name" ]; then
echo "Found view: $view_name"
fi
continue
fi
# If we're capturing a view
if $capture_view; then
# Check if we've reached the end (GO statement)
if echo "$line" | grep -i "^[[:space:]]*GO[[:space:]]*$" >/dev/null; then
# Add GO to the view definition
current_object+=$'\n'"GO"
process_view "$current_object" "$view_name"
capture_view=false
current_object=""
view_name=""
continue
fi
# Add line to current object
current_object+=$'\n'"$line"
fi
done
# Handle case where last view might not have a GO statement
if $capture_view && [ -n "$current_object" ]; then
process_view "$current_object" "$view_name"
fi
}
# Pre-process the file to normalize line endings and remove comments
echo "Extracting views..."
sed 's/--.*$//; /^[[:space:]]*$/d' "$SQL_FILE" | extract_views
echo "Views have been saved in $BASE_DIR/views"
# Count and list files
count=$(ls -1 "$BASE_DIR/views"/*.sql 2>/dev/null | wc -l || echo 0)
echo -e "\nTotal views extracted: $count"
if [ "$count" -gt 0 ]; then
echo -e "\nExtracted views:"
for file in "$BASE_DIR/views"/*.sql; do
if [ -f "$file" ]; then
echo "- $(basename "$file")"
fi
done
fi

View File

@ -0,0 +1,44 @@
-- Create the database
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'st-database')
BEGIN
CREATE DATABASE [st-database]
END
GO
USE [st-database]
GO
-- Create schemas (excluding dbo since it already exists)
DECLARE @SQL nvarchar(max)
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'fp')
BEGIN
SET @SQL = 'CREATE SCHEMA fp AUTHORIZATION dbo'
EXEC sp_executesql @SQL
PRINT 'Created schema fp'
END
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'fw')
BEGIN
SET @SQL = 'CREATE SCHEMA fw AUTHORIZATION dbo'
EXEC sp_executesql @SQL
PRINT 'Created schema fw'
END
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'int')
BEGIN
SET @SQL = 'CREATE SCHEMA int AUTHORIZATION dbo'
EXEC sp_executesql @SQL
PRINT 'Created schema int'
END
IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = 'ob')
BEGIN
SET @SQL = 'CREATE SCHEMA ob AUTHORIZATION dbo'
EXEC sp_executesql @SQL
PRINT 'Created schema ob'
END
-- Verify schemas
SELECT name FROM sys.schemas WHERE name IN ('fp', 'fw', 'int', 'ob')
GO

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,149 @@
#!/bin/bash
# Start SQL Server
/opt/mssql/bin/sqlservr &
# Wait for SQL Server to start
echo "Waiting for SQL Server to start..."
sleep 30s
# Initialize database
for i in {1..50};
do
sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT 1" &> /dev/null
if [ $? -eq 0 ]
then
echo "SQL Server is ready"
break
else
echo "SQL Server is not ready yet..."
sleep 1
fi
done
# Check if we should drop the database
if [ "${DROP_DATABASE,,}" = "true" ]; then
echo "DROP_DATABASE is true. Attempting to drop database..."
sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "
IF EXISTS (SELECT 1 FROM sys.databases WHERE name = 'st-database')
BEGIN
ALTER DATABASE [st-database] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [st-database];
END"
if [ $? -eq 0 ]; then
echo "Database dropped successfully."
else
echo "Error dropping database"
exit 1
fi
# Check if database already exists and has tables
echo "Checking if database is already initialized..."
# First check if database exists
DB_EXISTS=$(sqlcmd -S localhost -U sa -P $SA_PASSWORD -h -1 -Q "
IF EXISTS (SELECT 1 FROM sys.databases WHERE name = 'st-database')
SELECT 1
ELSE
SELECT 0" | tr -d '[:space:]')
echo "Database exists check result: '$DB_EXISTS'"
if [ "$DB_EXISTS" = "1" ]; then
echo "Database st-database already exists and is initialized. Skipping setup."
else
echo "Database needs initialization. Starting setup..."
# Create st-database if it doesn't exist
echo "Creating st-database if it doesn't exist..."
sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'st-database') CREATE DATABASE [st-database]"
if [ $? -ne 0 ]; then
echo "Error creating database"
exit 1
fi
# Run the initialization script
echo "Running initialization script..."
sqlcmd -S localhost -U sa -P $SA_PASSWORD -d st-database -i /usr/src/app/init.sql
if [ $? -ne 0 ]; then
echo "Error executing initialization script"
exit 1
fi
# Clean up existing files in sql_objects directories
echo "Cleaning up existing files..."
rm -f /usr/src/app/sql_objects/*/*.sql
rm -f /usr/src/app/sql_objects/indexes/*/*.sql
# Process each schema file through the extraction scripts
echo "Processing schema files..."
for schema_file in /usr/src/app/schemas/*.sql
do
echo "Processing schema file: $schema_file"
# Extract different types of SQL objects
bash /usr/src/app/extract_tables.sh "$schema_file"
if [ $? -ne 0 ]; then
echo "Warning: Table extraction had some errors but continuing..."
fi
bash /usr/src/app/extract_constraints.sh "$schema_file"
bash /usr/src/app/extract_indexes.sh "$schema_file"
bash /usr/src/app/extract_views.sh "$schema_file"
bash /usr/src/app/extract_procedures.sh "$schema_file"
done
# Function to execute SQL files from a directory
execute_sql_files() {
local dir=$1
local type=$2
if [ -d "$dir" ] && [ "$(ls -A $dir 2>/dev/null)" ]; then
echo "Executing $type..."
for sql_file in "$dir"/*.sql; do
if [ -f "$sql_file" ]; then
echo "Executing $sql_file..."
sqlcmd -S localhost -U sa -P $SA_PASSWORD -d st-database -i "$sql_file"
if [ $? -ne 0 ]; then
echo "Warning: Error executing $sql_file but continuing..."
fi
fi
done
else
echo "No files found in $dir"
fi
}
# Execute SQL objects in the correct order
echo "Executing SQL objects in order..."
# 1. Tables
execute_sql_files "sql_objects/tables" "tables"
# 2. Constraints
execute_sql_files "sql_objects/constraints" "constraints"
execute_sql_files "sql_objects/foreign_keys" "foreign keys"
# 3. Indexes
execute_sql_files "sql_objects/indexes/clustered" "clustered indexes"
execute_sql_files "sql_objects/indexes/unique_clustered" "unique clustered indexes"
execute_sql_files "sql_objects/indexes/nonclustered" "nonclustered indexes"
# 4. Views
execute_sql_files "sql_objects/views" "views"
# 5. Stored Procedures
execute_sql_files "sql_objects/procedures" "stored procedures"
# Clean up
echo "Cleaning up..."
rm -rf sql_objects
echo "SQL object execution completed"
fi
fi
# Keep container running
while true; do
sleep 1
done

218
ef-migration/readme.md Normal file
View File

@ -0,0 +1,218 @@
# Entity Framework Database-First Setup Guide
## Project Structure
Your solution should follow this structure for optimal organization:
```
YourSolution/
├── src/
│ ├── OnePlan/ <- Your project
│ │ ├── Controllers/
│ │ ├── Models/ <- Scaffolded models will go here
│ │ └── Data/ <- DbContext will go here
├── tests/
│ └── OnePlan.Tests/
├── tools/
│ └── scaffold.bat <- Scaffolding script here
└── YourSolution.sln
```
## Prerequisites
Before starting, ensure you have:
1. .NET SDK installed
2. Entity Framework Core tools installed globally:
```bash
dotnet tool install --global dotnet-ef
```
3. Required NuGet packages in your project:
```xml
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0" />
</ItemGroup>
```
## Scaffolding Process
### Step 1: Create Scaffold Script
Create a file named `scaffold.bat` in your `tools` directory with the following content:
```bat
@echo off
cd ..\src\OnePlan
dotnet ef dbcontext scaffold^
"Server=your_server;Database=your_database;User=your_user;Password=your_password;TrustServerCertificate=True;Encrypt=True;"^
Microsoft.EntityFrameworkCore.SqlServer^
--project OnePlan.csproj^
--context-dir Data^
--output-dir Models^
--context OnePlanDbContext^
--force^
--data-annotations^
--no-onconfiguring^
-t fp.AddProviderEncountersDataForCharges^
-t fp.AddProviderSummary^
-t fp.AdjustmentChunkingConfiguration^
-t fp.APEDepartmentWorkflowStatus^
-t fp.APEWorkflow^
-t fp.BenefitsSpreads^
-t fp.BudgetConfig^
-t fp.BudgetConfigDefaultSetting^
-t fp.BudgetConfigSetting^
-t fp.BudgetRefreshRequest^
-t fp.BudgetRefreshRequestHistory^
-t fp.ChargeVolumeAddProviderAdjustment^
-t fp.ChargeVolumeSpreads^
-t fp.DataRefreshTargetThreshold^
-t fp.DepartmentChargeVolumeAdjustment^
-t fp.DepartmentConfig^
-t fp.DimCategory^
-t fw.DimDepartment^
-t dss.DimPhysician^
-t fp.EngineLog^
-t fp.EntityGroupConfig^
-t fp.FixChangeHistoryRequest^
-t fp.GeneralLedger^
-t fp.GeneralLedgerInitialPlanConfigDetail^
-t fp.GeneralLedgerSpreads^
-t fp.InitialPlanRule^
-t dbo.LOCK^
-t dbo.log^
-t dbo.OnePlanPerformanceTestHistory^
-t fp.OnePlanPerformanceTestValidationResult^
-t fp.PerformanceTestingSetting^
-t fp.ProviderCompensationSpreads^
-t fp.SamplingLog^
-t fp.ScheduledRefreshRequest^
-t fp.ServiceLineEncounterSpreads^
-t fp.SettingCategory^
-t fp.SpreadHistory^
-t fp.StaffingInitialPlanConfigDetail^
-t fp.StaffingSpreads^
-t fp.StatisticsSpreads^
-t fp.SystemSetting^
-t dbo.TEScheduledTask^
-t dbo.UserProfile^
-t fp.viewBenefitsAdjustment^
-t fp.viewDepartmentChargeVolumeAdjustment^
-t fp.viewGeneralLedgerAdjustment^
-t fp.viewReimbursementAdjustment^
-t fp.viewReimbursementGeneralLedgerAdjustment^
-t fp.viewServiceLineEncounterAdjustment^
-t fp.viewStaffingAdjustment^
-t fp.viewStatisticsAdjustment
pause
```
Important Notes for Multi-line Batch Files:
1. The `^` character must be the last character on each line (no spaces after it)
2. Each new line should start with a space before the parameter
3. The connection string must be in quotes
4. The last command line doesn't need a `^`
5. Use `..\` instead of `../` for Windows paths
To run the scaffold script:
1. Open command prompt
2. Navigate to the tools directory: `cd tools`
3. Run: `scaffold.bat`
### Step 2: Configure Connection String
Add your connection string to `appsettings.json`:
```json
{
"ConnectionStrings": {
"DefaultConnection": "Server=your_server;Database=your_database;User=your_user;Password=your_password;TrustServerCertificate=True;Encrypt=True;"
}
}
```
### Step 3: Set Up Dependency Injection
1. Modify the generated DbContext to use constructor injection:
```csharp
public class OnePlanDbContext : DbContext
{
public OnePlanDbContext(DbContextOptions<OnePlanDbContext> options)
: base(options)
{
}
// Your DbSet properties will be here
}
```
2. Register the DbContext in `Program.cs`:
```csharp
var builder = WebApplication.CreateBuilder(args);
// Add DbContext
builder.Services.AddDbContext<OnePlanDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
```
## DbContext Organization
You have two main approaches for organizing your DbContext:
1. **Single DbContext (Recommended for this project)**
```csharp
public class OnePlanDbContext : DbContext
{
// All tables from all schemas
public DbSet<BudgetConfig> BudgetConfigs { get; set; }
public DbSet<DimDepartment> DimDepartments { get; set; }
// ... etc for all tables
}
```
Advantages:
- Simpler to manage
- All relationships maintained automatically
- Better for cross-schema transactions
- Easier to maintain data consistency
- Single dependency to inject
2. **Multiple DbContexts by Schema**
```csharp
public class FinancialPlanningDbContext : DbContext
{
// Only fp schema tables
public DbSet<BudgetConfig> BudgetConfigs { get; set; }
}
public class FrameworkDbContext : DbContext
{
// Only fw schema tables
public DbSet<DimDepartment> DimDepartments { get; set; }
}
```
Advantages:
- Better separation of concerns
- More focused contexts
- Can be more performant for specific schema operations
- Better for microservices architecture
For this project, the single DbContext approach is recommended due to:
- Highly interconnected tables
- Cross-schema queries
- Views joining data across schemas
- Coherent domain model around financial planning
## Notes
- Views are included in the scaffold and will be read-only
- The scaffold includes all specified tables across multiple schemas
- Relationships between tables will be automatically mapped
- Generated models will be placed in the Models directory
- DbContext will be placed in the Data directory
- Use data annotations for simple configurations
- Use fluent API in OnModelCreating for complex configurations

View File

@ -0,0 +1,91 @@
using System.Linq.Expressions;
using Strata.Code.Business.Services.Interfaces;
using Strata.Code.DataAccess.Models;
using Strata.Code.DataAccess.Repositories.Interfaces;
namespace Strata.Code.Business.Services
{
public class BudgetConfigDefaultSettingService : IBudgetConfigDefaultSettingService
{
private readonly IBudgetConfigDefaultSettingRepository _repository;
public BudgetConfigDefaultSettingService(IBudgetConfigDefaultSettingRepository repository)
{
_repository = repository;
}
public async Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetAllAsync()
{
var settings = await _repository.GetAllAsync();
return settings.Select(s => MapToDto(s));
}
public async Task<BudgetConfigDefaultSettingDto?> GetByIdAsync(int id)
{
var setting = await _repository.GetByIdAsync(id);
return setting != null ? MapToDto(setting) : null;
}
public async Task<BudgetConfigDefaultSettingDto> CreateAsync(BudgetConfigDefaultSettingDto settingDto)
{
var setting = MapToEntity(settingDto);
var result = await _repository.CreateAsync(setting);
return MapToDto(result);
}
public async Task<BudgetConfigDefaultSettingDto?> UpdateAsync(BudgetConfigDefaultSettingDto settingDto)
{
var setting = MapToEntity(settingDto);
var result = await _repository.UpdateAsync(setting);
return result != null ? MapToDto(result) : null;
}
public async Task<bool> DeleteAsync(int id)
{
return await _repository.DeleteAsync(id);
}
public async Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetByNameAsync(string name)
{
var settings = await _repository.GetByNameAsync(name);
return settings.Select(MapToDto);
}
public async Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetByIdsAsync(IEnumerable<int> ids)
{
var settings = await _repository.GetByIdsAsync(ids);
return settings.Select(MapToDto);
}
public async Task<IEnumerable<BudgetConfigDefaultSettingDto>> FindByAsync(
Expression<Func<BudgetConfigDefaultSetting, bool>> predicate)
{
var settings = await _repository.FindByAsync(predicate);
return settings.Select(MapToDto);
}
private BudgetConfigDefaultSettingDto MapToDto(BudgetConfigDefaultSetting entity)
{
return new BudgetConfigDefaultSettingDto
{
SettingId = entity.SettingId,
Name = entity.Name,
DefaultValue = entity.DefaultValue,
Description = entity.Description,
DateCreated = entity.DateCreated
};
}
private BudgetConfigDefaultSetting MapToEntity(BudgetConfigDefaultSettingDto dto)
{
return new BudgetConfigDefaultSetting
{
SettingId = dto.SettingId,
Name = dto.Name,
DefaultValue = dto.DefaultValue,
Description = dto.Description,
DateCreated = dto.DateCreated
};
}
}
}

View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Strata.Code.DataAccess.Models;
namespace Strata.Code.Business.Services.Interfaces
{
public class BudgetConfigDefaultSettingDto
{
public int SettingId { get; set; }
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
public bool DefaultValue { get; set; }
public DateOnly DateCreated { get; set; }
}
public class LinkedSettingsRequest<T>
{
public string LinkTable { get; set; } = null!;
public string LinkColumn { get; set; } = null!;
public IEnumerable<T> LinkIds { get; set; } = null!;
}
public interface IBudgetConfigDefaultSettingService
{
Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetAllAsync();
Task<BudgetConfigDefaultSettingDto?> GetByIdAsync(int id);
Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetByNameAsync(string name);
Task<IEnumerable<BudgetConfigDefaultSettingDto>> GetByIdsAsync(IEnumerable<int> ids);
Task<BudgetConfigDefaultSettingDto> CreateAsync(BudgetConfigDefaultSettingDto setting);
Task<BudgetConfigDefaultSettingDto?> UpdateAsync(BudgetConfigDefaultSettingDto setting);
Task<bool> DeleteAsync(int id);
Task<IEnumerable<BudgetConfigDefaultSettingDto>> FindByAsync(Expression<Func<BudgetConfigDefaultSetting, bool>> predicate);
}
}

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Strata.Code.DataAccess\Strata.Code.DataAccess.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,794 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Strata.Code.DataAccess.Models;
using Lock = Strata.Code.DataAccess.Models.Lock;
namespace Strata.Code.DataAccess.Data;
public partial class OnePlanDbContext : DbContext
{
public OnePlanDbContext(DbContextOptions<OnePlanDbContext> options)
: base(options)
{
}
public virtual DbSet<AddProviderEncountersDataForCharge> AddProviderEncountersDataForCharges { get; set; }
public virtual DbSet<AddProviderSummary> AddProviderSummaries { get; set; }
public virtual DbSet<AdjustmentChunkingConfiguration> AdjustmentChunkingConfigurations { get; set; }
public virtual DbSet<ApedepartmentWorkflowStatus> ApedepartmentWorkflowStatuses { get; set; }
public virtual DbSet<Apeworkflow> Apeworkflows { get; set; }
public virtual DbSet<BenefitsSpread> BenefitsSpreads { get; set; }
public virtual DbSet<BudgetConfig> BudgetConfigs { get; set; }
public virtual DbSet<BudgetConfigDefaultSetting> BudgetConfigDefaultSettings { get; set; }
public virtual DbSet<BudgetConfigSetting> BudgetConfigSettings { get; set; }
public virtual DbSet<BudgetRefreshRequest> BudgetRefreshRequests { get; set; }
public virtual DbSet<BudgetRefreshRequestHistory> BudgetRefreshRequestHistories { get; set; }
public virtual DbSet<ChargeVolumeAddProviderAdjustment> ChargeVolumeAddProviderAdjustments { get; set; }
public virtual DbSet<ChargeVolumeSpread> ChargeVolumeSpreads { get; set; }
public virtual DbSet<DataRefreshTargetThreshold> DataRefreshTargetThresholds { get; set; }
public virtual DbSet<DepartmentChargeVolumeAdjustment> DepartmentChargeVolumeAdjustments { get; set; }
public virtual DbSet<DepartmentConfig> DepartmentConfigs { get; set; }
public virtual DbSet<DimCategory> DimCategories { get; set; }
public virtual DbSet<DimDepartment> DimDepartments { get; set; }
public virtual DbSet<EngineLog> EngineLogs { get; set; }
public virtual DbSet<EntityGroupConfig> EntityGroupConfigs { get; set; }
public virtual DbSet<FixChangeHistoryRequest> FixChangeHistoryRequests { get; set; }
public virtual DbSet<GeneralLedger> GeneralLedgers { get; set; }
public virtual DbSet<GeneralLedgerInitialPlanConfigDetail> GeneralLedgerInitialPlanConfigDetails { get; set; }
public virtual DbSet<GeneralLedgerSpread> GeneralLedgerSpreads { get; set; }
public virtual DbSet<InitialPlanRule> InitialPlanRules { get; set; }
public virtual DbSet<Lock> Locks { get; set; }
public virtual DbSet<OnePlanPerformanceTestValidationResult> OnePlanPerformanceTestValidationResults { get; set; }
public virtual DbSet<PerformanceTestingSetting> PerformanceTestingSettings { get; set; }
public virtual DbSet<ProviderCompensationSpread> ProviderCompensationSpreads { get; set; }
public virtual DbSet<SamplingLog> SamplingLogs { get; set; }
public virtual DbSet<ScheduledRefreshRequest> ScheduledRefreshRequests { get; set; }
public virtual DbSet<ServiceLineEncounterSpread> ServiceLineEncounterSpreads { get; set; }
public virtual DbSet<SettingCategory> SettingCategories { get; set; }
public virtual DbSet<SpreadHistory> SpreadHistories { get; set; }
public virtual DbSet<StaffingInitialPlanConfigDetail> StaffingInitialPlanConfigDetails { get; set; }
public virtual DbSet<StaffingSpread> StaffingSpreads { get; set; }
public virtual DbSet<StatisticsSpread> StatisticsSpreads { get; set; }
public virtual DbSet<SystemSetting> SystemSettings { get; set; }
public virtual DbSet<TescheduledTask> TescheduledTasks { get; set; }
public virtual DbSet<UserProfile> UserProfiles { get; set; }
public virtual DbSet<ViewReimbursementAdjustment> ViewReimbursementAdjustments { get; set; }
public virtual DbSet<ViewStaffingAdjustment> ViewStaffingAdjustments { get; set; }
public virtual DbSet<ViewStatisticsAdjustment> ViewStatisticsAdjustments { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<AddProviderEncountersDataForCharge>(entity =>
{
entity.HasKey(e => e.AddProviderEncountersDataForChargesId).HasName("PK__AddProvi__E4129B703B27669A");
entity.Property(e => e.AddProviderEncountersDataForChargesId).ValueGeneratedNever();
entity.Property(e => e.AdjustmentGuid).HasDefaultValueSql("(newid())");
entity.HasOne(d => d.Adjustment).WithMany(p => p.AddProviderEncountersDataForCharges)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__AddProvid__Adjus__6B6F9474");
});
modelBuilder.Entity<AddProviderSummary>(entity =>
{
entity.HasKey(e => e.SummaryId).HasName("PK__AddProvi__DAB10E0F746AF6DC");
entity.Property(e => e.SummaryId).ValueGeneratedNever();
entity.Property(e => e.BenchmarkProvidersJson).HasDefaultValue("");
entity.Property(e => e.Comment).HasDefaultValue("");
entity.Property(e => e.StartDateUtc).HasDefaultValueSql("(getdate())");
});
modelBuilder.Entity<AdjustmentChunkingConfiguration>(entity =>
{
entity.HasKey(e => e.SectionId).HasName("PK__Adjustme__80EF0892617FCD5C");
entity.Property(e => e.Description).HasDefaultValueSql("((0))");
});
modelBuilder.Entity<ApedepartmentWorkflowStatus>(entity =>
{
entity.HasKey(e => e.DepartmentWorkflowStatusId).HasName("PK__APEDepar__30315255363CAB35");
entity.Property(e => e.DepartmentWorkflowStatusId).ValueGeneratedNever();
entity.Property(e => e.EnteredStepDateTimeUtc).HasDefaultValueSql("(getutcdate())");
entity.HasOne(d => d.WorkflowStep).WithMany(p => p.ApedepartmentWorkflowStatuses)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__APEDepart__Workf__0232CC71");
});
modelBuilder.Entity<Apeworkflow>(entity =>
{
entity.HasKey(e => e.WorkflowStepId).HasName("PK__APEWorkf__361214019DCA4D7C");
entity.Property(e => e.WorkflowStepId).ValueGeneratedNever();
entity.Property(e => e.Name).HasDefaultValue("");
});
modelBuilder.Entity<BenefitsSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.DepartmentId, e.AccountId }).HasName("PK__Benefits__F1B9F395006A0F0D");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.BenefitsSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpBenefitsSpreads_History");
});
modelBuilder.Entity<BudgetConfig>(entity =>
{
entity.HasKey(e => e.BudgetConfigGuid).HasName("PK__BudgetCo__4ED93B3C311E4EB0");
entity.Property(e => e.BudgetConfigGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AllowLocalAdminAddAccountMyBudgets).HasDefaultValue(true);
entity.Property(e => e.AllowLocalAdminAddAccountPlanEditor).HasDefaultValue(true);
entity.Property(e => e.AllowLocalAdminAddEmpAddFteplanEditor).HasDefaultValue(true);
entity.Property(e => e.AllowLocalAdminAddEmpAddJobCodeMyBudgets).HasDefaultValue(true);
entity.Property(e => e.BudgetConfigName).HasDefaultValue("Default Budget");
entity.Property(e => e.ChargeMasterConfigJson).HasDefaultValue("");
entity.Property(e => e.Comments).HasDefaultValue("");
entity.Property(e => e.CurrentBudgetPhaseId).HasDefaultValue((byte)2);
entity.Property(e => e.DateModified).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DatePublished).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DefaultReimbursementProjectionMethodId).HasDefaultValue(1);
entity.Property(e => e.IsChargeMasterRefreshedForDollarImpactReport).HasDefaultValue(true);
entity.Property(e => e.IsGlbudgetHistoryAvailable).HasDefaultValue(true);
entity.Property(e => e.IsOverUnderFundedUsed).HasDefaultValue(true);
entity.Property(e => e.IsRestrictDepartmentAccess).HasDefaultValue(true);
entity.Property(e => e.IsStaffingBudgetHistoryAvailable).HasDefaultValue(true);
entity.Property(e => e.IsTargetingEmailEnabled).HasDefaultValue(true);
});
modelBuilder.Entity<BudgetConfigDefaultSetting>(entity =>
{
entity.HasKey(e => e.SettingId).HasName("PK__BudgetCo__54372AFD9588A33A");
entity.Property(e => e.SettingId).ValueGeneratedNever();
entity.Property(e => e.DateCreated).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DefaultValue).HasDefaultValue(true);
entity.Property(e => e.Description).HasDefaultValue("");
entity.Property(e => e.Name).HasDefaultValue("");
});
modelBuilder.Entity<BudgetConfigSetting>(entity =>
{
entity.HasOne(d => d.Setting).WithMany()
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__BudgetCon__Setti__3CD3D5C5");
});
modelBuilder.Entity<BudgetRefreshRequest>(entity =>
{
entity.HasKey(e => e.RequestGuid).HasName("PK__BudgetRe__2F8FD1AD6F774206");
entity.Property(e => e.RequestGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AffectedDepartments).HasDefaultValue("");
entity.Property(e => e.CurrentDataRefreshMethod).HasDefaultValue("");
entity.Property(e => e.DateEnded).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateEndedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateStarted).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateStartedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateTimeStamp).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DateTimeStampUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.EmailAddress).HasDefaultValue("");
entity.Property(e => e.ErrorMessage).HasDefaultValue("");
entity.Property(e => e.InitialSamplingJson).HasDefaultValue("");
entity.Property(e => e.InitialSourceDimensionalityJson).HasDefaultValue("");
entity.Property(e => e.SamplingJson).HasDefaultValue("");
entity.Property(e => e.Source).HasDefaultValue("");
entity.Property(e => e.SourceDimensionalityJson).HasDefaultValue("");
entity.Property(e => e.StackTrace).HasDefaultValue("");
entity.Property(e => e.UserName).HasDefaultValue("");
});
modelBuilder.Entity<BudgetRefreshRequestHistory>(entity =>
{
entity.Property(e => e.AffectedDepartments).HasDefaultValue("");
entity.Property(e => e.CanceledBy).HasDefaultValue("");
entity.Property(e => e.DateEndedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateStartedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateTimeStampUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.InitialSamplingJson).HasDefaultValue("");
entity.Property(e => e.InitialSourceDimensionalityJson).HasDefaultValue("");
entity.Property(e => e.JazzVersion).HasDefaultValue("");
entity.Property(e => e.SamplingJson).HasDefaultValue("");
entity.Property(e => e.Source).HasDefaultValue("");
});
modelBuilder.Entity<ChargeVolumeAddProviderAdjustment>(entity =>
{
entity.HasKey(e => e.RowId).HasName("PK__ChargeVo__FFEE74512DFAE56C");
entity.Property(e => e.RowId).ValueGeneratedNever();
});
modelBuilder.Entity<ChargeVolumeSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.DepartmentId, e.ServiceLineId, e.ChargeCodeId, e.PatientClassId, e.AgeCohortId, e.MedicalSurgicalId }).HasName("PK__ChargeVo__C17B5AD86F7201B4");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.Department).WithMany(p => p.ChargeVolumeSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpChargeVolumeSpreads_Department");
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.ChargeVolumeSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_ChargeVolumeSpreads_History");
});
modelBuilder.Entity<DataRefreshTargetThreshold>(entity =>
{
entity.Property(e => e.ClassName).HasDefaultValue("");
});
modelBuilder.Entity<DepartmentChargeVolumeAdjustment>(entity =>
{
entity.HasKey(e => e.AdjustmentGuid).HasName("PK__Departme__7EE745958E5F2A5E");
entity.Property(e => e.AdjustmentGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AdjustedProperty).HasDefaultValue("");
entity.Property(e => e.AdjustmentFilterJson).HasDefaultValue("");
entity.Property(e => e.AuthorFullName).HasDefaultValue("");
entity.Property(e => e.Comment).HasDefaultValue("");
entity.Property(e => e.DateCreatedUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.DimensionMemberJson).HasDefaultValue("");
entity.Property(e => e.GroupingHierarchyJson).HasDefaultValue("");
entity.Property(e => e.LastModifiedDateUtc).HasDefaultValueSql("(getutcdate())");
entity.HasOne(d => d.BudgetConfig).WithMany(p => p.DepartmentChargeVolumeAdjustments)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__Departmen__Budge__49A9B822");
});
modelBuilder.Entity<DepartmentConfig>(entity =>
{
entity.HasKey(e => e.DepartmentConfigGuid).HasName("PK__Departme__1D24F47EE8255C75");
entity.Property(e => e.DepartmentConfigGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.UpdatedDate).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.HasOne(d => d.Department).WithMany(p => p.DepartmentConfigs)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__Departmen__Depar__2393C03C");
entity.HasOne(d => d.EntityGroupConfig).WithMany(p => p.DepartmentConfigs)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__Departmen__Entit__3983015B");
});
modelBuilder.Entity<DimCategory>(entity =>
{
entity.Property(e => e.Category).HasDefaultValue("");
});
modelBuilder.Entity<DimDepartment>(entity =>
{
entity.HasKey(e => e.DepartmentId).HasName("PK__DimDepar__B2079BCDE1B9CD6D");
entity.Property(e => e.DepartmentId).ValueGeneratedNever();
entity.Property(e => e.AttributionType).HasDefaultValue("");
entity.Property(e => e.CareSetting).HasDefaultValue("");
entity.Property(e => e.CompAnDepartment).HasDefaultValue("");
entity.Property(e => e.ConsolidatedCode).HasDefaultValue("");
entity.Property(e => e.DepartmentCode).HasDefaultValue("");
entity.Property(e => e.DepartmentCodeRaw).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup1).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup1Code).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup2).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup2Code).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup3).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup3Code).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup4).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup4Code).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup5).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup5Code).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup6).HasDefaultValue("");
entity.Property(e => e.DepartmentRollup6Code).HasDefaultValue("");
entity.Property(e => e.DepartmentType).HasDefaultValue("");
entity.Property(e => e.DepartmentTypeOld).HasDefaultValue("Not Specified");
entity.Property(e => e.Description).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup1Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup2Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup3Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup4Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup5Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup6Name).HasDefaultValue("");
entity.Property(e => e.DssdepartmentRollup7Name).HasDefaultValue("");
entity.Property(e => e.DssdeptGrouping).HasDefaultValue("");
entity.Property(e => e.Entity).HasDefaultValue("");
entity.Property(e => e.EntityCode).HasDefaultValue("");
entity.Property(e => e.EntityTypeOverride).HasDefaultValue((short)-1);
entity.Property(e => e.FunctionalArea).HasDefaultValue("");
entity.Property(e => e.Fund).HasDefaultValue("");
entity.Property(e => e.HomeDepartment).HasDefaultValue("");
entity.Property(e => e.IsLrfp).HasDefaultValue(true);
entity.Property(e => e.MemberGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.Mrdirector).HasDefaultValue("");
entity.Property(e => e.Mrmanager).HasDefaultValue("");
entity.Property(e => e.MrvicePresident).HasDefaultValue("");
entity.Property(e => e.ObglobalStatisticsPlan).HasDefaultValue("");
entity.Property(e => e.ObreimbursementPlan).HasDefaultValue("");
entity.Property(e => e.ObserviceLinePlan).HasDefaultValue("");
entity.Property(e => e.PatientTypeRollupName).HasDefaultValue("");
entity.Property(e => e.ProductivityPercentile).HasDefaultValue("");
entity.Property(e => e.Program).HasDefaultValue("");
entity.Property(e => e.Project).HasDefaultValue("");
entity.Property(e => e.ResearchDepartmentCategoryName).HasDefaultValue("");
entity.Property(e => e.SpaccountRollupName).HasDefaultValue("");
entity.Property(e => e.SpbalanceSheetPlanName).HasDefaultValue("");
entity.Property(e => e.SphdepartmentName).HasDefaultValue("");
entity.Property(e => e.SphdepartmentRollupName).HasDefaultValue("");
entity.Property(e => e.SphdepartmentType).HasDefaultValue("");
entity.Property(e => e.SpjobCodeGroupName).HasDefaultValue("");
entity.Property(e => e.SpoperationsPlanName).HasDefaultValue("");
entity.Property(e => e.SpphysicianGroupName).HasDefaultValue("");
entity.Property(e => e.SprollingForecastPlanName).HasDefaultValue("");
entity.Property(e => e.System).HasDefaultValue("");
entity.Property(e => e.Version)
.IsRowVersion()
.IsConcurrencyToken();
});
modelBuilder.Entity<EngineLog>(entity =>
{
entity.HasKey(e => new { e.RequestGuid, e.AttemptId, e.StepId }).HasName("PK__EngineLo__613A431601789AAF");
entity.Property(e => e.RequestGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AffectedDepartments).HasDefaultValue("");
entity.Property(e => e.ClassName).HasDefaultValue("");
entity.Property(e => e.DateEnded).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateStarted).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.ErrorMessage).HasDefaultValue("");
entity.Property(e => e.OptionsJson).HasDefaultValue("");
entity.Property(e => e.SourceDimensionalityJson).HasDefaultValue("");
entity.Property(e => e.StackTrace).HasDefaultValue("");
entity.Property(e => e.StepName).HasDefaultValue("");
});
modelBuilder.Entity<EntityGroupConfig>(entity =>
{
entity.HasKey(e => e.EntityGroupConfigGuid).HasName("PK__EntityGr__1D36B145FC4497F8");
entity.Property(e => e.EntityGroupConfigGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AccountLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.BenefitsLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.Comments).HasDefaultValue("");
entity.Property(e => e.DateModified).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DatePublished).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DepartmentChargeVolumeLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.Name).HasDefaultValue("");
entity.Property(e => e.PayrollLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.RevenueAndDeductionsLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.ServiceLineEncounterLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.StatisticsLastSampled).HasDefaultValue(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
});
modelBuilder.Entity<FixChangeHistoryRequest>(entity =>
{
entity.HasKey(e => e.RequestGuid).HasName("PK__FixChang__2F8FD1AD343212A7");
entity.Property(e => e.RequestGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.DateCreatedUtc).HasDefaultValueSql("(getdate())");
});
modelBuilder.Entity<GeneralLedger>(entity =>
{
entity.HasKey(e => e.GeneralLedgerId).HasName("PK__GeneralL__9520696BDEB4E430");
entity.Property(e => e.GeneralLedgerId).ValueGeneratedNever();
entity.Property(e => e.AddDate).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.BudgetPercentAdjustmentFactor01).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor02).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor03).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor04).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor05).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor06).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor07).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor08).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor09).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor10).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor11).HasDefaultValue(1m);
entity.Property(e => e.BudgetPercentAdjustmentFactor12).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor01).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor02).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor03).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor04).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor05).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor06).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor07).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor08).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor09).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor10).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor11).HasDefaultValue(1m);
entity.Property(e => e.ProjectionPercentAdjustmentFactor12).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor01).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor02).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor03).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor04).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor05).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor06).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor07).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor08).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor09).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor10).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor11).HasDefaultValue(1m);
entity.Property(e => e.TargetPercentAdjustmentFactor12).HasDefaultValue(1m);
entity.HasOne(d => d.Department).WithMany(p => p.GeneralLedgers)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_GeneralLedger_Department");
});
modelBuilder.Entity<GeneralLedgerInitialPlanConfigDetail>(entity =>
{
entity.HasKey(e => e.RowId).HasName("PK__GeneralL__FFEE7451BBA831F0");
entity.Property(e => e.RowId).ValueGeneratedNever();
entity.HasOne(d => d.BudgetConfig).WithMany(p => p.GeneralLedgerInitialPlanConfigDetails)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__GeneralLe__Budge__34EBC896");
});
modelBuilder.Entity<GeneralLedgerSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.DepartmentId, e.AccountId }).HasName("PK__GeneralL__F1B9F3954D99BE3F");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.GeneralLedgerSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpGeneralLedgerSpreads_History");
});
modelBuilder.Entity<InitialPlanRule>(entity =>
{
entity.HasKey(e => e.RowId).HasName("PK__InitialP__FFEE745128948D89");
entity.Property(e => e.RowId).ValueGeneratedNever();
entity.Property(e => e.DimensionalityJson).HasDefaultValue("");
entity.Property(e => e.VersionId).HasDefaultValue(0);
entity.HasOne(d => d.BudgetConfig).WithMany(p => p.InitialPlanRules)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__InitialPl__Budge__269DA93F");
});
modelBuilder.Entity<Lock>(entity =>
{
entity.Property(e => e.DateLastActive).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DateLastActiveUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.DateLocked).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DateLockedUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.LockGroup).HasDefaultValue("");
entity.Property(e => e.LockGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.UserName).HasDefaultValue("");
});
modelBuilder.Entity<OnePlanPerformanceTestValidationResult>(entity =>
{
entity.Property(e => e.ColumnName).HasDefaultValue("");
entity.Property(e => e.TableName).HasDefaultValue("");
});
modelBuilder.Entity<PerformanceTestingSetting>(entity =>
{
entity.HasKey(e => e.SystemSettingId).HasName("PK__Performa__0191E99DAC87483C");
entity.Property(e => e.SystemSettingId).ValueGeneratedNever();
entity.Property(e => e.DateCreated).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DefaultValue).HasDefaultValue("");
entity.Property(e => e.Description).HasDefaultValue("");
entity.Property(e => e.Name).HasDefaultValue("");
entity.Property(e => e.Value).HasDefaultValue("");
});
modelBuilder.Entity<ProviderCompensationSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.ProviderId, e.ProviderLineItemId, e.DepartmentId, e.JobCodeId, e.PayCodeGroupId, e.UnitTypeId }).HasName("PK__Provider__7B156FC863658543");
entity.Property(e => e.UnitTypeId).HasDefaultValue((byte)34);
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.Department).WithMany(p => p.ProviderCompensationSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpProviderCompensationSpreads_Department");
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.ProviderCompensationSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_ProviderCompensationSpreads_History");
});
modelBuilder.Entity<SamplingLog>(entity =>
{
entity.Property(e => e.DateEndedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.DateStartedUtc).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.JazzVersion).HasDefaultValue("");
entity.Property(e => e.SourceDimensionalityJson).HasDefaultValue("");
});
modelBuilder.Entity<ScheduledRefreshRequest>(entity =>
{
entity.HasKey(e => e.RequestGuid).HasName("PK__Schedule__2F8FD1AD3D1EE6FD");
entity.Property(e => e.RequestGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.SamplingJson).HasDefaultValue("");
entity.Property(e => e.SourceDimensionalityJson).HasDefaultValue("");
});
modelBuilder.Entity<ServiceLineEncounterSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.EntityId, e.ServiceLineId, e.PatientClassId }).HasName("PK__ServiceL__BC32EA931931BBFB");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.ServiceLineEncounterSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_ServiceLineEncounterSpreads_History");
});
modelBuilder.Entity<SpreadHistory>(entity =>
{
entity.HasKey(e => e.SpreadHistoryGuid).HasName("PK__SpreadHi__3D43A8E02794F612");
entity.Property(e => e.AuthorFullName).HasDefaultValue("");
entity.Property(e => e.Date).HasDefaultValueSql("(getdate())");
});
modelBuilder.Entity<StaffingInitialPlanConfigDetail>(entity =>
{
entity.HasKey(e => e.RowId).HasName("PK__Staffing__FFEE7451B817743E");
entity.Property(e => e.RowId).ValueGeneratedNever();
entity.HasOne(d => d.BudgetConfig).WithMany(p => p.StaffingInitialPlanConfigDetails)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK__StaffingI__Budge__77ADB02C");
});
modelBuilder.Entity<StaffingSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.DepartmentId, e.JobCodeId, e.PayCodeGroupId }).HasName("PK__Staffing__6D5B21DD532F427F");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.Department).WithMany(p => p.StaffingSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpStaffingSpreads_Department");
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.StaffingSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_StaffingSpreads_History");
});
modelBuilder.Entity<StatisticsSpread>(entity =>
{
entity.HasKey(e => new { e.BudgetConfigId, e.DepartmentId, e.AccountId, e.ProviderId, e.ProviderLineItemId }).HasName("PK__Statisti__9854220EA98934E2");
entity.Property(e => e.GlobalSpreadId).HasDefaultValue(1);
entity.Property(e => e.SpreadPercentage01).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage02).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage03).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage04).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage05).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage06).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage07).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage08).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage09).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage10).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage11).HasDefaultValue(0m);
entity.Property(e => e.SpreadPercentage12).HasDefaultValue(0m);
entity.Property(e => e.TotalImportedValue).HasDefaultValue(0m);
entity.HasOne(d => d.Department).WithMany(p => p.StatisticsSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_FpStatisticsSpreads_Department");
entity.HasOne(d => d.SpreadHistory).WithMany(p => p.StatisticsSpreads)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_StatisticsSpreads_History");
});
modelBuilder.Entity<SystemSetting>(entity =>
{
entity.HasKey(e => e.SystemSettingId).HasName("PK__SystemSe__0191E99D578204DD");
entity.Property(e => e.SystemSettingId).ValueGeneratedNever();
entity.Property(e => e.DateCreated).HasDefaultValueSql("(getdate())");
entity.Property(e => e.DefaultValue).HasDefaultValue("");
entity.Property(e => e.Description).HasDefaultValue("");
entity.Property(e => e.Name).HasDefaultValue("");
entity.Property(e => e.Value).HasDefaultValue("");
});
modelBuilder.Entity<TescheduledTask>(entity =>
{
entity.HasKey(e => e.ScheduledTaskGuid).HasName("PK__TESchedu__F13F6EC0946D3031");
entity.Property(e => e.ScheduledTaskGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AssemblyQualifiedName).HasDefaultValue("");
entity.Property(e => e.DateCreatedUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.Description).HasDefaultValue("");
entity.Property(e => e.DisabledExpirationDate).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.EndDate).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.HasEndDate).HasDefaultValue(true);
entity.Property(e => e.LastRunDateUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.LastSubmittedDateUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.Name).HasDefaultValue("");
entity.Property(e => e.SetupXml).HasDefaultValue("");
entity.Property(e => e.StartDate).HasDefaultValue(new DateTime(1900, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
entity.Property(e => e.TimeZoneId).HasDefaultValue("Central Standard Time");
});
modelBuilder.Entity<UserProfile>(entity =>
{
entity.HasKey(e => e.UserGuid).HasName("PK__UserProf__81B7740C1EECCB67");
entity.Property(e => e.UserGuid).HasDefaultValueSql("(newid())");
entity.Property(e => e.AuthId).HasDefaultValue("");
entity.Property(e => e.BackupPassword).HasDefaultValue("");
entity.Property(e => e.BrowserVersion).HasDefaultValue("Unknown");
entity.Property(e => e.Custom1).HasDefaultValue("");
entity.Property(e => e.Custom2).HasDefaultValue("");
entity.Property(e => e.Custom3).HasDefaultValue("");
entity.Property(e => e.Custom4).HasDefaultValue("");
entity.Property(e => e.DefaultAppModeLevel).HasDefaultValue((byte)1);
entity.Property(e => e.Domain).HasDefaultValue("");
entity.Property(e => e.DotNetVersion).HasDefaultValue("");
entity.Property(e => e.EmailAddress).HasDefaultValue("");
entity.Property(e => e.HashedPassword).HasDefaultValue("");
entity.Property(e => e.LastChangedPasswordUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.LastLoginDateUtc).HasDefaultValueSql("(getutcdate())");
entity.Property(e => e.NameFirst).HasDefaultValue("");
entity.Property(e => e.NameLast).HasDefaultValue("");
entity.Property(e => e.PhoneNumber).HasDefaultValue("");
entity.Property(e => e.Salt).HasDefaultValueSql("(newid())");
entity.Property(e => e.UserAgent).HasDefaultValue("Unknown");
entity.Property(e => e.UserName).HasDefaultValue("");
});
modelBuilder.Entity<ViewReimbursementAdjustment>(entity =>
{
entity.ToView("viewReimbursementAdjustment", "fp");
});
modelBuilder.Entity<ViewStaffingAdjustment>(entity =>
{
entity.ToView("viewStaffingAdjustment", "fp");
});
modelBuilder.Entity<ViewStatisticsAdjustment>(entity =>
{
entity.ToView("viewStatisticsAdjustment", "fp");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("AddProviderEncountersDataForCharges", Schema = "fp")]
public partial class AddProviderEncountersDataForCharge
{
[Key]
[Column("AddProviderEncountersDataForChargesID")]
public int AddProviderEncountersDataForChargesId { get; set; }
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Column("EntityID")]
public int EntityId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("ServiceLineID")]
public int ServiceLineId { get; set; }
[Column("PatientClassID")]
public int PatientClassId { get; set; }
[Column("ChargeCodeID")]
public int ChargeCodeId { get; set; }
[Column("AgeCohortID")]
public int AgeCohortId { get; set; }
[Column("MedicalSurgicalID")]
public int MedicalSurgicalId { get; set; }
[Column("UnitTypeID")]
public int UnitTypeId { get; set; }
[Column("ServiceEntityID")]
public int ServiceEntityId { get; set; }
[Column("MSDRGID")]
public int Msdrgid { get; set; }
[Column("UBRevCodeID")]
public int UbrevCodeId { get; set; }
[Column("PrimaryCPTID")]
public int PrimaryCptid { get; set; }
[Column("ServiceProviderID")]
public int ServiceProviderId { get; set; }
[Column("ServiceProviderSpecialtyID")]
public int ServiceProviderSpecialtyId { get; set; }
[Column("PerformingProviderID")]
public int PerformingProviderId { get; set; }
[Column("PerformingProviderSpecialtyID")]
public int PerformingProviderSpecialtyId { get; set; }
[Column("BillingCPTID")]
public int BillingCptid { get; set; }
public bool IsProcessed { get; set; }
[ForeignKey("AdjustmentGuid")]
[InverseProperty("AddProviderEncountersDataForCharges")]
public virtual DepartmentChargeVolumeAdjustment Adjustment { get; set; } = null!;
}

View File

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("AddProviderSummary", Schema = "fp")]
[Index("SlencounterAdjustmentGuid", "DcvolumeAdjustmentGuid", Name = "IX_AddProviderSummary_LinkedAdjustments")]
public partial class AddProviderSummary
{
[Key]
[Column("SummaryID")]
public int SummaryId { get; set; }
[Column("SLEncounterAdjustmentGUID")]
public Guid? SlencounterAdjustmentGuid { get; set; }
[Column("DCVolumeAdjustmentGUID")]
public Guid? DcvolumeAdjustmentGuid { get; set; }
public int EmployeeType { get; set; }
[Column("EmployeeID")]
public int? EmployeeId { get; set; }
[Column("ProviderID")]
public int? ProviderId { get; set; }
public int ProviderType { get; set; }
public int Specialty { get; set; }
[Column("StartDateUTC", TypeName = "datetime")]
public DateTime StartDateUtc { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BenchmarkAverage { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetTotal { get; set; }
[Column("BenchmarkProvidersJSON")]
public string BenchmarkProvidersJson { get; set; } = null!;
public string Comment { get; set; } = null!;
[Column("ClassificationGroupID")]
public int ClassificationGroupId { get; set; }
[Column("ClassificationCategoryID")]
public int ClassificationCategoryId { get; set; }
}

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("AdjustmentChunkingConfiguration", Schema = "fp")]
public partial class AdjustmentChunkingConfiguration
{
[Key]
[Column("SectionID")]
public int SectionId { get; set; }
[StringLength(100)]
public string Description { get; set; } = null!;
public bool IsChunkingEnabled { get; set; }
public int MaxAdjustmentsPerChunk { get; set; }
public int MaxImportAdjustmentsPerChunk { get; set; }
public int MaxAdjustmentRecordCountForChunking { get; set; }
}

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("APEDepartmentWorkflowStatus", Schema = "fp")]
[Index("DepartmentId", "WorkflowStepId", Name = "UC_APEDepartmentWorkflowStatus_DepartmentID_WorkflowStepID", IsUnique = true)]
public partial class ApedepartmentWorkflowStatus
{
[Key]
[Column("DepartmentWorkflowStatusID")]
public int DepartmentWorkflowStatusId { get; set; }
[Column("WorkflowStepID")]
public int WorkflowStepId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
public byte Status { get; set; }
[Column(TypeName = "datetime")]
public DateTime EnteredStepDateTimeUtc { get; set; }
[ForeignKey("WorkflowStepId")]
[InverseProperty("ApedepartmentWorkflowStatuses")]
public virtual Apeworkflow WorkflowStep { get; set; } = null!;
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("APEWorkflow", Schema = "fp")]
public partial class Apeworkflow
{
[Key]
[Column("WorkflowStepID")]
public int WorkflowStepId { get; set; }
[StringLength(100)]
public string Name { get; set; } = null!;
[Column("RoleID")]
public int RoleId { get; set; }
public int WorkflowStepOrder { get; set; }
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
public bool IsEditable { get; set; }
public bool IsNotificationEnabled { get; set; }
[InverseProperty("WorkflowStep")]
public virtual ICollection<ApedepartmentWorkflowStatus> ApedepartmentWorkflowStatuses { get; set; } = new List<ApedepartmentWorkflowStatus>();
}

View File

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "DepartmentId", "AccountId")]
[Table("BenefitsSpreads", Schema = "fp")]
public partial class BenefitsSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("AccountID")]
public int AccountId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("BenefitsSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,149 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("BudgetConfig", Schema = "fp")]
[Index("BudgetConfigId", Name = "NCNU_BudgetConfig_BudgetConfigID")]
[Index("FiscalYearId", Name = "NCNU_BudgetConfig_FiscalYearID")]
public partial class BudgetConfig
{
[Key]
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
[Column("FiscalYearID")]
public short FiscalYearId { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Unicode(false)]
public string ChargeMasterConfigJson { get; set; } = null!;
[Column(TypeName = "smalldatetime")]
public DateTime DateModified { get; set; }
[Column(TypeName = "smalldatetime")]
public DateTime DatePublished { get; set; }
[StringLength(100)]
public string BudgetConfigName { get; set; } = null!;
public bool IsActive { get; set; }
[StringLength(2000)]
public string Comments { get; set; } = null!;
public bool IsOverUnderFundedUsed { get; set; }
[Column("IsFTEHidden")]
public bool IsFtehidden { get; set; }
public bool IsProjectionHidden { get; set; }
public bool IsArchived { get; set; }
public bool IsProjectCurrentYear { get; set; }
[Column("IsMRTracking")]
public bool IsMrtracking { get; set; }
[Column("ParentBudgetConfigID")]
public short ParentBudgetConfigId { get; set; }
public byte MonthsLoaded { get; set; }
[Column("CurrentBudgetPhaseID")]
public byte CurrentBudgetPhaseId { get; set; }
public byte AdjustmentClassificationSetting { get; set; }
public bool IsEngineDisabled { get; set; }
[Column("UseDSForSampling")]
public bool UseDsforSampling { get; set; }
[Column("IsGLBudgetHistoryAvailable")]
public bool IsGlbudgetHistoryAvailable { get; set; }
public bool IsStaffingBudgetHistoryAvailable { get; set; }
public bool IsTempoNonStaffingPageAvailable { get; set; }
public bool IsAdjustmentClassificationEnabled { get; set; }
public bool IsRestrictDepartmentAccess { get; set; }
public bool IsChargeMasterRefreshedForDollarImpactReport { get; set; }
[Column("DefaultReimbursementProjectionMethodID")]
public int DefaultReimbursementProjectionMethodId { get; set; }
public bool IsProviderVolumesEnabled { get; set; }
public bool IsTempoOtherRevenuePageAvailable { get; set; }
public bool UseEmployeePlanning { get; set; }
public bool IsUsingSystemGeneratedHistoricalStats { get; set; }
public bool IsSubAccountCategoriesEnabled { get; set; }
public bool AreStatisticsAccountsEnabled { get; set; }
public bool IsProviderCompensationEnabled { get; set; }
public bool DisplayCategoryInMyBudgets { get; set; }
public bool IsLocalAdminReadOnly { get; set; }
public bool IsTargetingEmailEnabled { get; set; }
[Column("AllowLocalAdminAddEmpAddFTEPlanEditor")]
public bool AllowLocalAdminAddEmpAddFteplanEditor { get; set; }
public bool AllowLocalAdminAddEmpAddJobCodeMyBudgets { get; set; }
public bool AllowLocalAdminAddAccountPlanEditor { get; set; }
public bool AllowLocalAdminAddAccountMyBudgets { get; set; }
public bool IsBudgetClosed { get; set; }
public bool IsStatisticsBudgetHistoryAvailable { get; set; }
public bool IsImpactReportsEnabled { get; set; }
[Column("DefaultReimbursementNetRevenueModelID")]
public int DefaultReimbursementNetRevenueModelId { get; set; }
public bool IsProviderPlanningEnabled { get; set; }
public bool IsUsedForReportComparison { get; set; }
public bool UseProviderSource { get; set; }
public bool IsProjectionLockedOnMyBudget { get; set; }
public bool IsBudgetLockedOnMyBudget { get; set; }
public bool EnableExceptionActionItems { get; set; }
public bool IsWorkWeekOverrideCheckIgnored { get; set; }
[InverseProperty("BudgetConfig")]
public virtual ICollection<DepartmentChargeVolumeAdjustment> DepartmentChargeVolumeAdjustments { get; set; } = new List<DepartmentChargeVolumeAdjustment>();
[InverseProperty("BudgetConfig")]
public virtual ICollection<GeneralLedgerInitialPlanConfigDetail> GeneralLedgerInitialPlanConfigDetails { get; set; } = new List<GeneralLedgerInitialPlanConfigDetail>();
[InverseProperty("BudgetConfig")]
public virtual ICollection<InitialPlanRule> InitialPlanRules { get; set; } = new List<InitialPlanRule>();
[InverseProperty("BudgetConfig")]
public virtual ICollection<StaffingInitialPlanConfigDetail> StaffingInitialPlanConfigDetails { get; set; } = new List<StaffingInitialPlanConfigDetail>();
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("BudgetConfigDefaultSetting", Schema = "fp")]
public partial class BudgetConfigDefaultSetting
{
[Key]
[Column("SettingID")]
public int SettingId { get; set; }
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
public bool DefaultValue { get; set; }
public DateOnly DateCreated { get; set; }
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("BudgetConfigSetting", Schema = "fp")]
public partial class BudgetConfigSetting
{
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Column("SettingID")]
public int SettingId { get; set; }
public bool Value { get; set; }
[ForeignKey("SettingId")]
public virtual BudgetConfigDefaultSetting Setting { get; set; } = null!;
}

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("BudgetRefreshRequest", Schema = "fp")]
public partial class BudgetRefreshRequest
{
[Key]
[Column("RequestGUID")]
public Guid RequestGuid { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateTimeStamp { get; set; }
[StringLength(64)]
public string UserName { get; set; } = null!;
[Column("SourceDimensionalityJSON")]
public string SourceDimensionalityJson { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime DateStarted { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateEnded { get; set; }
public byte Status { get; set; }
public string ErrorMessage { get; set; } = null!;
public string StackTrace { get; set; } = null!;
public string CurrentDataRefreshMethod { get; set; } = null!;
[Column("SourceActionID")]
public short SourceActionId { get; set; }
public string AffectedDepartments { get; set; } = null!;
public bool IsIgnoreTargetingError { get; set; }
[StringLength(100)]
public string Source { get; set; } = null!;
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
[Column("SamplingJSON")]
public string SamplingJson { get; set; } = null!;
[StringLength(2000)]
public string EmailAddress { get; set; } = null!;
[Column("InitialSamplingJSON")]
public string InitialSamplingJson { get; set; } = null!;
[Column("InitialSourceDimensionalityJSON")]
public string InitialSourceDimensionalityJson { get; set; } = null!;
[Column("DateTimeStampUTC", TypeName = "datetime")]
public DateTime DateTimeStampUtc { get; set; }
[Column("DateStartedUTC", TypeName = "datetime")]
public DateTime DateStartedUtc { get; set; }
[Column("DateEndedUTC", TypeName = "datetime")]
public DateTime DateEndedUtc { get; set; }
[Column("PlanSectionID")]
public int PlanSectionId { get; set; }
}

View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("BudgetRefreshRequestHistory", Schema = "fp")]
public partial class BudgetRefreshRequestHistory
{
[Column("RequestGUID")]
public Guid RequestGuid { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateTimeStamp { get; set; }
[StringLength(64)]
public string UserName { get; set; } = null!;
[Column("SourceDimensionalityJSON")]
public string SourceDimensionalityJson { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime DateStarted { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateEnded { get; set; }
public byte Status { get; set; }
public string? ErrorMessage { get; set; }
public string? StackTrace { get; set; }
[Column("SourceActionID")]
public short SourceActionId { get; set; }
public string AffectedDepartments { get; set; } = null!;
[Column("CollapsedRequestGUID")]
public Guid CollapsedRequestGuid { get; set; }
public bool IsIgnoreTargetingError { get; set; }
[StringLength(100)]
public string Source { get; set; } = null!;
[StringLength(100)]
public string JazzVersion { get; set; } = null!;
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
[Column("SamplingJSON")]
public string SamplingJson { get; set; } = null!;
[Column("InitialSamplingJSON")]
public string InitialSamplingJson { get; set; } = null!;
[Column("InitialSourceDimensionalityJSON")]
public string InitialSourceDimensionalityJson { get; set; } = null!;
public string CanceledBy { get; set; } = null!;
[Column("DateTimeStampUTC", TypeName = "datetime")]
public DateTime DateTimeStampUtc { get; set; }
[Column("DateStartedUTC", TypeName = "datetime")]
public DateTime DateStartedUtc { get; set; }
[Column("DateEndedUTC", TypeName = "datetime")]
public DateTime DateEndedUtc { get; set; }
public int AffectedDepartmentCount { get; set; }
[Column("PlanSectionID")]
public int PlanSectionId { get; set; }
}

View File

@ -0,0 +1,114 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("ChargeVolumeAddProviderAdjustment", Schema = "fp")]
[Index("BudgetConfigId", "AdjustmentGuid", "EntityId", "DepartmentId", "ServiceLineId", "PatientClassId", "AgeCohortId", "MedicalSurgicalId", "ChargeCodeId", "ServiceEntityId", "Msdrgid", "UbrevCodeId", "PrimaryCptid", "ServiceProviderId", "ServiceProviderSpecialtyId", "PerformingProviderId", "PerformingProviderSpecialtyId", "BillingCptid", "TimeClassId", "BudgetPhaseId", Name = "IX_ClusteredUnique", IsUnique = true)]
public partial class ChargeVolumeAddProviderAdjustment
{
[Key]
[Column("RowID")]
public int RowId { get; set; }
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("EntityID")]
public int EntityId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("ServiceLineID")]
public int ServiceLineId { get; set; }
[Column("PatientClassID")]
public int PatientClassId { get; set; }
[Column("AgeCohortID")]
public int AgeCohortId { get; set; }
[Column("MedicalSurgicalID")]
public int MedicalSurgicalId { get; set; }
[Column("ChargeCodeID")]
public int ChargeCodeId { get; set; }
[Column("ServiceEntityID")]
public int ServiceEntityId { get; set; }
[Column("MSDRGID")]
public int Msdrgid { get; set; }
[Column("UBRevCodeID")]
public int UbrevCodeId { get; set; }
[Column("PrimaryCPTID")]
public int PrimaryCptid { get; set; }
[Column("BillingCPTID")]
public int BillingCptid { get; set; }
[Column("ServiceProviderID")]
public int ServiceProviderId { get; set; }
[Column("ServiceProviderSpecialtyID")]
public int ServiceProviderSpecialtyId { get; set; }
[Column("PerformingProviderID")]
public int PerformingProviderId { get; set; }
[Column("PerformingProviderSpecialtyID")]
public int PerformingProviderSpecialtyId { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("BudgetPhaseID")]
public byte BudgetPhaseId { get; set; }
public bool IsRecordDeleted { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value12 { get; set; }
}

View File

@ -0,0 +1,119 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "DepartmentId", "ServiceLineId", "ChargeCodeId", "PatientClassId", "AgeCohortId", "MedicalSurgicalId")]
[Table("ChargeVolumeSpreads", Schema = "fp")]
public partial class ChargeVolumeSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("ServiceLineID")]
public int ServiceLineId { get; set; }
[Key]
[Column("ChargeCodeID")]
public int ChargeCodeId { get; set; }
[Key]
[Column("PatientClassID")]
public int PatientClassId { get; set; }
[Key]
[Column("AgeCohortID")]
public int AgeCohortId { get; set; }
[Key]
[Column("MedicalSurgicalID")]
public int MedicalSurgicalId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[Column("ChargeEntityID")]
public int ChargeEntityId { get; set; }
[Column("MSDRGID")]
public int Msdrgid { get; set; }
[Column("UBRevCodeID")]
public int UbrevCodeId { get; set; }
[Column("CPTID")]
public int Cptid { get; set; }
[Column("ServiceProviderID")]
public int ServiceProviderId { get; set; }
[Column("ServiceProviderSpecialtyID")]
public int ServiceProviderSpecialtyId { get; set; }
[Column("BillingProviderID")]
public int BillingProviderId { get; set; }
[Column("BillingProviderSpecialtyID")]
public int BillingProviderSpecialtyId { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("ChargeVolumeSpreads")]
public virtual DimDepartment Department { get; set; } = null!;
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("ChargeVolumeSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("DataRefreshTargetThreshold", Schema = "fp")]
public partial class DataRefreshTargetThreshold
{
[StringLength(300)]
public string ClassName { get; set; } = null!;
public int Threshold { get; set; }
}

View File

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("DepartmentChargeVolumeAdjustment", Schema = "fp")]
public partial class DepartmentChargeVolumeAdjustment
{
[Key]
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
public byte AdjustmentType { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value { get; set; }
[Column("AdjustmentFilterJSON")]
public string AdjustmentFilterJson { get; set; } = null!;
[Column("GroupingHierarchyJSON")]
public string GroupingHierarchyJson { get; set; } = null!;
[StringLength(100)]
public string AdjustedProperty { get; set; } = null!;
public string Comment { get; set; } = null!;
[Column("AuthorGUID")]
public Guid AuthorGuid { get; set; }
[StringLength(260)]
public string AuthorFullName { get; set; } = null!;
[Column("GroupingGUID")]
public Guid GroupingGuid { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("ClassificationGroupID")]
public int ClassificationGroupId { get; set; }
[Column("ClassificationCategoryID")]
public int ClassificationCategoryId { get; set; }
public bool IsRecordDeleted { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime LastModifiedDateUtc { get; set; }
public string DimensionMemberJson { get; set; } = null!;
public int AffectedDataCount { get; set; }
[Column("AdjustmentID")]
public int AdjustmentId { get; set; }
public bool IsErrored { get; set; }
[InverseProperty("Adjustment")]
public virtual ICollection<AddProviderEncountersDataForCharge> AddProviderEncountersDataForCharges { get; set; } = new List<AddProviderEncountersDataForCharge>();
[ForeignKey("BudgetConfigGuid")]
[InverseProperty("DepartmentChargeVolumeAdjustments")]
public virtual BudgetConfig BudgetConfig { get; set; } = null!;
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("DepartmentConfig", Schema = "fp")]
[Index("DepartmentId", Name = "NCNU_DepartmentConfig_DepartmentID")]
[Index("EntityGroupConfigGuid", Name = "NCNU_DepartmentConfig_EntityGroupConfigGUID")]
[Index("DepartmentId", "EntityGroupConfigGuid", Name = "UC_FP_DepartmentConfig_DeptID_EGC", IsUnique = true)]
public partial class DepartmentConfig
{
[Key]
[Column("DepartmentConfigGUID")]
public Guid DepartmentConfigGuid { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column(TypeName = "datetime")]
public DateTime UpdatedDate { get; set; }
[Column("EntityGroupConfigGUID")]
public Guid EntityGroupConfigGuid { get; set; }
public bool HasStatistics { get; set; }
public bool HasRevenueAndDeductions { get; set; }
public bool HasOtherRevenue { get; set; }
public bool HasRoster { get; set; }
public bool HasStaffing { get; set; }
public bool HasBenefits { get; set; }
public bool HasNonStaffingExpenses { get; set; }
public bool HasZeroBasedExpenses { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("DepartmentConfigs")]
public virtual DimDepartment Department { get; set; } = null!;
[ForeignKey("EntityGroupConfigGuid")]
[InverseProperty("DepartmentConfigs")]
public virtual EntityGroupConfig EntityGroupConfig { get; set; } = null!;
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("DimCategory", Schema = "fp")]
public partial class DimCategory
{
[Column("CategoryID")]
public int CategoryId { get; set; }
[StringLength(50)]
[Unicode(false)]
public string Category { get; set; } = null!;
}

View File

@ -0,0 +1,478 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("DimDepartment", Schema = "fw")]
[Index("DepartmentRollup1Id", Name = "IX_DepartmentRollup1ID")]
[Index("DepartmentRollup2Id", Name = "IX_DepartmentRollup2ID")]
[Index("DepartmentRollup3Id", Name = "IX_DepartmentRollup3ID")]
[Index("DepartmentRollup4Id", Name = "IX_DepartmentRollup4ID")]
[Index("DepartmentRollup5Id", Name = "IX_DepartmentRollup5ID")]
[Index("DepartmentRollup6Id", Name = "IX_DepartmentRollup6ID")]
[Index("DepartmentId", "DepartmentRollup1Id", "DepartmentRollup2Id", "DepartmentRollup3Id", "DepartmentRollup4Id", "DepartmentRollup5Id", "DepartmentRollup6Id", Name = "IX_Hierarchy")]
[Index("MemberGuid", Name = "IX_MemberGUID")]
[Index("IsMrorPr", "DepartmentId", Name = "NCNU_DimDepartment_IsMRorPR_DepartmentID")]
[Index("DepartmentId", "EntityId", Name = "NCNU_EntityID")]
[Index("DepartmentCode", Name = "NCU_DepartmentCode", IsUnique = true)]
public partial class DimDepartment
{
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("MemberGUID")]
public Guid MemberGuid { get; set; }
[StringLength(100)]
public string DepartmentCode { get; set; } = null!;
[StringLength(100)]
public string Description { get; set; } = null!;
[Column("SystemID")]
public short SystemId { get; set; }
[StringLength(100)]
public string System { get; set; } = null!;
public int SystemSortOrder { get; set; }
[Column("EntityID")]
public int EntityId { get; set; }
[StringLength(303)]
public string? Entity { get; set; }
public int EntitySortOrder { get; set; }
public short EntityTypeOverride { get; set; }
[Column("DepartmentRollup1ID")]
public short DepartmentRollup1Id { get; set; }
[StringLength(200)]
public string DepartmentRollup1 { get; set; } = null!;
public int DepartmentRollup1SortOrder { get; set; }
[Column("DepartmentRollup2ID")]
public short DepartmentRollup2Id { get; set; }
[StringLength(200)]
public string DepartmentRollup2 { get; set; } = null!;
public int DepartmentRollup2SortOrder { get; set; }
[Column("DepartmentRollup3ID")]
public short DepartmentRollup3Id { get; set; }
[StringLength(200)]
public string DepartmentRollup3 { get; set; } = null!;
public int DepartmentRollup3SortOrder { get; set; }
[Column("DepartmentRollup4ID")]
public int DepartmentRollup4Id { get; set; }
[StringLength(200)]
public string DepartmentRollup4 { get; set; } = null!;
public int DepartmentRollup4SortOrder { get; set; }
[Column("DepartmentRollup5ID")]
public short DepartmentRollup5Id { get; set; }
[StringLength(200)]
public string DepartmentRollup5 { get; set; } = null!;
public int DepartmentRollup5SortOrder { get; set; }
[Column("DepartmentRollup6ID")]
public short DepartmentRollup6Id { get; set; }
[StringLength(200)]
public string DepartmentRollup6 { get; set; } = null!;
public int DepartmentRollup6SortOrder { get; set; }
[Column("CareSettingID")]
public int CareSettingId { get; set; }
[StringLength(100)]
public string CareSetting { get; set; } = null!;
public int SortOrder { get; set; }
public bool IsDepartmentRollup { get; set; }
[Column("FunctionalAreaID")]
public int FunctionalAreaId { get; set; }
[StringLength(100)]
public string FunctionalArea { get; set; } = null!;
[Column("ResearchDepartmentCategoryID")]
public int ResearchDepartmentCategoryId { get; set; }
[StringLength(100)]
public string ResearchDepartmentCategoryName { get; set; } = null!;
public int ResearchDepartmentCategorySortOrder { get; set; }
[Column("AttributionTypeID")]
public int AttributionTypeId { get; set; }
[StringLength(200)]
public string AttributionType { get; set; } = null!;
[Column("CAPIsDefined")]
public bool CapisDefined { get; set; }
[Column("IsCAP")]
public bool IsCap { get; set; }
[Column("DSSIsDefined")]
public bool DssisDefined { get; set; }
[Column("IsDSS")]
public bool IsDss { get; set; }
[Column("DepartmentTypeOLD")]
[StringLength(100)]
public string DepartmentTypeOld { get; set; } = null!;
[Column("DSSDeptGrouping")]
[StringLength(200)]
public string DssdeptGrouping { get; set; } = null!;
[Column("DSSDepartmentRollup1ID")]
public int DssdepartmentRollup1Id { get; set; }
[Column("DSSDepartmentRollup1Name")]
[StringLength(100)]
public string DssdepartmentRollup1Name { get; set; } = null!;
[Column("DSSDepartmentRollup2ID")]
public int DssdepartmentRollup2Id { get; set; }
[Column("DSSDepartmentRollup2Name")]
[StringLength(100)]
public string DssdepartmentRollup2Name { get; set; } = null!;
[Column("DSSDepartmentRollup3ID")]
public int DssdepartmentRollup3Id { get; set; }
[Column("DSSDepartmentRollup3Name")]
[StringLength(100)]
public string DssdepartmentRollup3Name { get; set; } = null!;
public bool IsOverhead { get; set; }
[Column("OBIsDefined")]
public bool ObisDefined { get; set; }
[Column("IsOB")]
public bool IsOb { get; set; }
[Column("IsMRPlan")]
public bool IsMrplan { get; set; }
public bool IsActive { get; set; }
public bool IsVariable { get; set; }
public bool IsAccountFlexing { get; set; }
[Column("FlexingBucketGUID")]
public Guid FlexingBucketGuid { get; set; }
[Column("OBGlobalStatisticsPlanID")]
public int ObglobalStatisticsPlanId { get; set; }
[Column("OBGlobalStatisticsPlan")]
[StringLength(1000)]
public string ObglobalStatisticsPlan { get; set; } = null!;
[Column("OBReimbursementPlanID")]
public int ObreimbursementPlanId { get; set; }
[Column("OBReimbursementPlan")]
[StringLength(458)]
public string ObreimbursementPlan { get; set; } = null!;
[Column("OBServiceLinePlanID")]
public int ObserviceLinePlanId { get; set; }
[Column("OBServiceLinePlan")]
[StringLength(458)]
public string ObserviceLinePlan { get; set; } = null!;
[Column("SPIsDefined")]
public bool SpisDefined { get; set; }
[Column("IsLRFP")]
public bool IsLrfp { get; set; }
[Column("RollingPlanID")]
public int RollingPlanId { get; set; }
[Column("SPRollingForecastPlanName")]
[StringLength(200)]
public string SprollingForecastPlanName { get; set; } = null!;
[Column("OpsPlanID")]
public int OpsPlanId { get; set; }
[Column("SPOperationsPlanName")]
[StringLength(200)]
public string SpoperationsPlanName { get; set; } = null!;
[Column("BalPlanID")]
public int BalPlanId { get; set; }
[Column("SPBalanceSheetPlanName")]
[StringLength(200)]
public string SpbalanceSheetPlanName { get; set; } = null!;
public byte PatientTypeRollup { get; set; }
[StringLength(100)]
public string PatientTypeRollupName { get; set; } = null!;
[Column("SPJobCodeGroup")]
public int SpjobCodeGroup { get; set; }
[Column("SPJobCodeGroupName")]
[StringLength(100)]
public string SpjobCodeGroupName { get; set; } = null!;
[Column("SPPhysicianGroup")]
public int SpphysicianGroup { get; set; }
[Column("SPPhysicianGroupName")]
[StringLength(100)]
public string SpphysicianGroupName { get; set; } = null!;
[Column("SPAccountRollup")]
public int SpaccountRollup { get; set; }
[Column("SPAccountRollupName")]
[StringLength(100)]
public string SpaccountRollupName { get; set; } = null!;
[Column("SPServiceLineForecastType")]
public short SpserviceLineForecastType { get; set; }
[StringLength(100)]
public string ConsolidatedCode { get; set; } = null!;
public bool IsConsolidated { get; set; }
[Column("TransactionID")]
public int TransactionId { get; set; }
[Column("HistoryItemGUID")]
public Guid HistoryItemGuid { get; set; }
public byte[] Version { get; set; } = null!;
[StringLength(203)]
public string Name { get; set; } = null!;
[Column("SecureGroupID")]
public int SecureGroupId { get; set; }
[Column("WorkWeekID")]
public int WorkWeekId { get; set; }
[Column("CAPDefaultSalesTax")]
public double CapdefaultSalesTax { get; set; }
[StringLength(100)]
public string EntityCode { get; set; } = null!;
[Column("FundID")]
public int FundId { get; set; }
[StringLength(100)]
public string Fund { get; set; } = null!;
public int FundSortOrder { get; set; }
[Column("ProjectID")]
public int ProjectId { get; set; }
[StringLength(100)]
public string Project { get; set; } = null!;
public int ProjectSortOrder { get; set; }
[Column("HomeDepartmentID")]
public int HomeDepartmentId { get; set; }
[StringLength(100)]
public string HomeDepartment { get; set; } = null!;
public int HomeDepartmentSortOrder { get; set; }
[Column("ProgramID")]
public int ProgramId { get; set; }
[StringLength(100)]
public string Program { get; set; } = null!;
public int ProgramSortOrder { get; set; }
[Column("PayCycleID")]
public int PayCycleId { get; set; }
[Column("FWIsDefined")]
public bool FwisDefined { get; set; }
[Column("DepartmentTypeID")]
public int DepartmentTypeId { get; set; }
[StringLength(200)]
public string DepartmentType { get; set; } = null!;
[StringLength(100)]
public string DepartmentCodeRaw { get; set; } = null!;
[Column("IsPR")]
public bool IsPr { get; set; }
[Column("MRVicePresident")]
[StringLength(400)]
public string MrvicePresident { get; set; } = null!;
[Column("MRDirector")]
[StringLength(400)]
public string Mrdirector { get; set; } = null!;
[Column("MRManager")]
[StringLength(400)]
public string Mrmanager { get; set; } = null!;
[Column("IsMROrPR")]
public int IsMrorPr { get; set; }
[Column("IsMRMetricTracking")]
public bool IsMrmetricTracking { get; set; }
public bool IsHealthPlanAdmin { get; set; }
[StringLength(200)]
public string DepartmentRollup1Code { get; set; } = null!;
[StringLength(200)]
public string DepartmentRollup2Code { get; set; } = null!;
[StringLength(200)]
public string DepartmentRollup3Code { get; set; } = null!;
[StringLength(200)]
public string DepartmentRollup4Code { get; set; } = null!;
[StringLength(200)]
public string DepartmentRollup5Code { get; set; } = null!;
[StringLength(200)]
public string DepartmentRollup6Code { get; set; } = null!;
[Column("DSSDepartmentRollup4Name")]
[StringLength(100)]
public string DssdepartmentRollup4Name { get; set; } = null!;
[Column("DSSDepartmentRollup4ID")]
public int DssdepartmentRollup4Id { get; set; }
[Column("DSSDepartmentRollup5ID")]
public int DssdepartmentRollup5Id { get; set; }
[Column("DSSDepartmentRollup5Name")]
[StringLength(100)]
public string DssdepartmentRollup5Name { get; set; } = null!;
[Column("DSSDepartmentRollup6ID")]
public int DssdepartmentRollup6Id { get; set; }
[Column("DSSDepartmentRollup6Name")]
[StringLength(200)]
public string DssdepartmentRollup6Name { get; set; } = null!;
[Column("DSSDepartmentRollup7ID")]
public int DssdepartmentRollup7Id { get; set; }
[Column("DSSDepartmentRollup7Name")]
[StringLength(100)]
public string DssdepartmentRollup7Name { get; set; } = null!;
[Column("SPHDepartmentRollupID")]
public int SphdepartmentRollupId { get; set; }
[Column("SPHDepartmentRollupName")]
[StringLength(200)]
public string SphdepartmentRollupName { get; set; } = null!;
[Column("SPHDepartmentRollupConfidenceScore")]
public double SphdepartmentRollupConfidenceScore { get; set; }
[Column("SPHDepartmentTypeID")]
public int SphdepartmentTypeId { get; set; }
[Column("SPHDepartmentType")]
[StringLength(200)]
public string SphdepartmentType { get; set; } = null!;
public bool IsClaimsCosting { get; set; }
[Column("SPHDepartmentRollupIsValidated")]
public bool SphdepartmentRollupIsValidated { get; set; }
[Column("CompAnDepartmentID")]
public int CompAnDepartmentId { get; set; }
[Column("ProductivityPercentileID")]
public int ProductivityPercentileId { get; set; }
[StringLength(200)]
public string ProductivityPercentile { get; set; } = null!;
[StringLength(200)]
public string CompAnDepartment { get; set; } = null!;
[Column("SPHDepartmentID")]
public int SphdepartmentId { get; set; }
[Column("SPHDepartmentConfidenceScore")]
public double SphdepartmentConfidenceScore { get; set; }
[Column("SPHDepartmentIsValidated")]
public bool SphdepartmentIsValidated { get; set; }
[Column("SPHDepartmentName")]
[StringLength(200)]
public string SphdepartmentName { get; set; } = null!;
[InverseProperty("Department")]
public virtual ICollection<ChargeVolumeSpread> ChargeVolumeSpreads { get; set; } = new List<ChargeVolumeSpread>();
[InverseProperty("Department")]
public virtual ICollection<DepartmentConfig> DepartmentConfigs { get; set; } = new List<DepartmentConfig>();
[InverseProperty("Department")]
public virtual ICollection<GeneralLedger> GeneralLedgers { get; set; } = new List<GeneralLedger>();
[InverseProperty("Department")]
public virtual ICollection<ProviderCompensationSpread> ProviderCompensationSpreads { get; set; } = new List<ProviderCompensationSpread>();
[InverseProperty("Department")]
public virtual ICollection<StaffingSpread> StaffingSpreads { get; set; } = new List<StaffingSpread>();
[InverseProperty("Department")]
public virtual ICollection<StatisticsSpread> StatisticsSpreads { get; set; } = new List<StatisticsSpread>();
}

View File

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("RequestGuid", "AttemptId", "StepId")]
[Table("EngineLog", Schema = "fp")]
public partial class EngineLog
{
[Key]
[Column("RequestGUID")]
public Guid RequestGuid { get; set; }
[Key]
[Column("StepID")]
public int StepId { get; set; }
[Key]
[Column("AttemptID")]
public int AttemptId { get; set; }
[StringLength(300)]
public string StepName { get; set; } = null!;
[StringLength(300)]
public string ClassName { get; set; } = null!;
[Column("SourceDimensionalityJSON")]
public string SourceDimensionalityJson { get; set; } = null!;
[Column("OptionsJSON")]
public string OptionsJson { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime DateStarted { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateEnded { get; set; }
public byte Status { get; set; }
public string ErrorMessage { get; set; } = null!;
public string StackTrace { get; set; } = null!;
public string AffectedDepartments { get; set; } = null!;
public int AffectedDepartmentCount { get; set; }
}

View File

@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("EntityGroupConfig", Schema = "fp")]
public partial class EntityGroupConfig
{
[Key]
[Column("EntityGroupConfigGUID")]
public Guid EntityGroupConfigGuid { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
[StringLength(100)]
public string? Name { get; set; }
[StringLength(1000)]
public string? Comments { get; set; }
[Column("AccountTimeClassID")]
public byte AccountTimeClassId { get; set; }
[Column("AccountFiscalYearID")]
public short AccountFiscalYearId { get; set; }
[Column("PayrollTimeClassID")]
public byte PayrollTimeClassId { get; set; }
[Column("PayrollFiscalYearID")]
public short PayrollFiscalYearId { get; set; }
[Column("ServiceLineEncounterTimeClassID")]
public byte ServiceLineEncounterTimeClassId { get; set; }
[Column("ServiceLineEncounterFiscalYearID")]
public short ServiceLineEncounterFiscalYearId { get; set; }
[Column("DepartmentChargeVolumeTimeClassID")]
public byte DepartmentChargeVolumeTimeClassId { get; set; }
[Column("DepartmentChargeVolumeFiscalYearID")]
public short DepartmentChargeVolumeFiscalYearId { get; set; }
[Column(TypeName = "datetime")]
public DateTime AccountLastSampled { get; set; }
[Column(TypeName = "datetime")]
public DateTime PayrollLastSampled { get; set; }
[Column(TypeName = "datetime")]
public DateTime ServiceLineEncounterLastSampled { get; set; }
[Column(TypeName = "datetime")]
public DateTime DepartmentChargeVolumeLastSampled { get; set; }
[Column("CostingConfigGUID")]
public Guid CostingConfigGuid { get; set; }
[Column("CostingConfigTimeClassID")]
public byte CostingConfigTimeClassId { get; set; }
[Column(TypeName = "smalldatetime")]
public DateTime? DateModified { get; set; }
[Column(TypeName = "smalldatetime")]
public DateTime? DatePublished { get; set; }
[Column("BenefitsTimeClassID")]
public byte BenefitsTimeClassId { get; set; }
[Column("BenefitsFiscalYearID")]
public short BenefitsFiscalYearId { get; set; }
[Column(TypeName = "datetime")]
public DateTime BenefitsLastSampled { get; set; }
public bool IsMarkedForDeletion { get; set; }
[Column("StatisticsTimeClassID")]
public byte StatisticsTimeClassId { get; set; }
[Column("StatisticsFiscalYearID")]
public short StatisticsFiscalYearId { get; set; }
[Column(TypeName = "datetime")]
public DateTime StatisticsLastSampled { get; set; }
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
public bool IsBudgetLockDown { get; set; }
public bool IsRosterUsed { get; set; }
public short StatisticsModel { get; set; }
[Column("RevenueAndDeductionsTimeClassID")]
public byte RevenueAndDeductionsTimeClassId { get; set; }
[Column("RevenueAndDeductionsFiscalYearID")]
public short RevenueAndDeductionsFiscalYearId { get; set; }
[Column(TypeName = "datetime")]
public DateTime RevenueAndDeductionsLastSampled { get; set; }
public bool IsPatientActivityFlexingForStaffing { get; set; }
public bool IsPatientActivityFlexingForNonStaffing { get; set; }
public Guid ParentEntityGroupConfigGuid { get; set; }
public bool IsPayorGroupUsedForCrosswalk { get; set; }
[InverseProperty("EntityGroupConfig")]
public virtual ICollection<DepartmentConfig> DepartmentConfigs { get; set; } = new List<DepartmentConfig>();
}

View File

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("FixChangeHistoryRequest", Schema = "fp")]
public partial class FixChangeHistoryRequest
{
[Key]
[Column("RequestGUID")]
public Guid RequestGuid { get; set; }
public byte ChangeHistoryRecordType { get; set; }
[Column("DateCreatedUTC", TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column("BasisID")]
public int BasisId { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("BudgetPhaseID")]
public byte BudgetPhaseId { get; set; }
public bool IsRecordDeleted { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value12 { get; set; }
}

View File

@ -0,0 +1,812 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("GeneralLedger", Schema = "fp")]
[Index("AccountId", Name = "IX_GeneralLedger_Account")]
[Index("BudgetConfigId", Name = "IX_GeneralLedger_BudgetDollarsConfig")]
[Index("DepartmentId", Name = "IX_GeneralLedger_Department")]
[Index("EntityId", Name = "IX_GeneralLedger_Entity")]
[Index("EntityGroupConfigId", "FlexingTypeId", Name = "IX_GeneralLedger_EntityGroupConfig")]
public partial class GeneralLedger
{
[Key]
[Column("GeneralLedgerID")]
public int GeneralLedgerId { get; set; }
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
[Column("EntityID")]
public int EntityId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("AccountID")]
public int AccountId { get; set; }
[Column("FinancialReportingID")]
public int FinancialReportingId { get; set; }
[Column("VariabilityID")]
public int VariabilityId { get; set; }
[Column("APEModelSectionID")]
public byte ApemodelSectionId { get; set; }
[Column(TypeName = "datetime")]
public DateTime AddDate { get; set; }
public bool IsNew { get; set; }
[Column("FlexingTypeID")]
public short FlexingTypeId { get; set; }
[Column("ChangeHistoryGroupingGUID")]
public Guid ChangeHistoryGroupingGuid { get; set; }
public byte BudgetLockType { get; set; }
public byte BudgetLockFlag { get; set; }
public byte TargetLockType { get; set; }
public byte TargetLockFlag { get; set; }
public byte ProjectionLockType { get; set; }
public byte ProjectionLockFlag { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudgetTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjectionTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjustedTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjustedTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjustedTotal { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledBudget12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal SampledProjection12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudget12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjection12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetAdjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetAdjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionAdjusted12 { get; set; }
[Column("InitialBudgetDollarsPerUOS01", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos01 { get; set; }
[Column("InitialBudgetDollarsPerUOS02", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos02 { get; set; }
[Column("InitialBudgetDollarsPerUOS03", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos03 { get; set; }
[Column("InitialBudgetDollarsPerUOS04", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos04 { get; set; }
[Column("InitialBudgetDollarsPerUOS05", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos05 { get; set; }
[Column("InitialBudgetDollarsPerUOS06", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos06 { get; set; }
[Column("InitialBudgetDollarsPerUOS07", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos07 { get; set; }
[Column("InitialBudgetDollarsPerUOS08", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos08 { get; set; }
[Column("InitialBudgetDollarsPerUOS09", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos09 { get; set; }
[Column("InitialBudgetDollarsPerUOS10", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos10 { get; set; }
[Column("InitialBudgetDollarsPerUOS11", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos11 { get; set; }
[Column("InitialBudgetDollarsPerUOS12", TypeName = "decimal(18, 0)")]
public decimal InitialBudgetDollarsPerUos12 { get; set; }
[Column("InitialProjectionDollarsPerUOS01", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos01 { get; set; }
[Column("InitialProjectionDollarsPerUOS02", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos02 { get; set; }
[Column("InitialProjectionDollarsPerUOS03", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos03 { get; set; }
[Column("InitialProjectionDollarsPerUOS04", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos04 { get; set; }
[Column("InitialProjectionDollarsPerUOS05", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos05 { get; set; }
[Column("InitialProjectionDollarsPerUOS06", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos06 { get; set; }
[Column("InitialProjectionDollarsPerUOS07", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos07 { get; set; }
[Column("InitialProjectionDollarsPerUOS08", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos08 { get; set; }
[Column("InitialProjectionDollarsPerUOS09", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos09 { get; set; }
[Column("InitialProjectionDollarsPerUOS10", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos10 { get; set; }
[Column("InitialProjectionDollarsPerUOS11", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos11 { get; set; }
[Column("InitialProjectionDollarsPerUOS12", TypeName = "decimal(18, 0)")]
public decimal InitialProjectionDollarsPerUos12 { get; set; }
[Column("TargetDollarsPerUOSAdjusted01", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted01 { get; set; }
[Column("TargetDollarsPerUOSAdjusted02", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted02 { get; set; }
[Column("TargetDollarsPerUOSAdjusted03", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted03 { get; set; }
[Column("TargetDollarsPerUOSAdjusted04", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted04 { get; set; }
[Column("TargetDollarsPerUOSAdjusted05", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted05 { get; set; }
[Column("TargetDollarsPerUOSAdjusted06", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted06 { get; set; }
[Column("TargetDollarsPerUOSAdjusted07", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted07 { get; set; }
[Column("TargetDollarsPerUOSAdjusted08", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted08 { get; set; }
[Column("TargetDollarsPerUOSAdjusted09", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted09 { get; set; }
[Column("TargetDollarsPerUOSAdjusted10", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted10 { get; set; }
[Column("TargetDollarsPerUOSAdjusted11", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted11 { get; set; }
[Column("TargetDollarsPerUOSAdjusted12", TypeName = "decimal(18, 0)")]
public decimal TargetDollarsPerUosadjusted12 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted01", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted01 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted02", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted02 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted03", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted03 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted04", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted04 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted05", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted05 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted06", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted06 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted07", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted07 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted08", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted08 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted09", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted09 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted10", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted10 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted11", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted11 { get; set; }
[Column("BudgetDollarsPerUOSAdjusted12", TypeName = "decimal(18, 0)")]
public decimal BudgetDollarsPerUosadjusted12 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted01", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted01 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted02", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted02 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted03", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted03 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted04", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted04 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted05", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted05 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted06", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted06 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted07", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted07 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted08", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted08 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted09", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted09 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted10", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted10 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted11", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted11 { get; set; }
[Column("ProjectionDollarsPerUOSAdjusted12", TypeName = "decimal(18, 0)")]
public decimal ProjectionDollarsPerUosadjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialBudgetPercentOfCharge12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal InitialProjectionPercentOfCharge12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentOfChargeAdjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentOfChargeAdjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentOfChargeAdjusted12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal TargetPercentAdjustmentFactor12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BudgetPercentAdjustmentFactor12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal ProjectionPercentAdjustmentFactor12 { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("GeneralLedgers")]
public virtual DimDepartment Department { get; set; } = null!;
}

View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("GeneralLedgerInitialPlanConfigDetail", Schema = "fp")]
public partial class GeneralLedgerInitialPlanConfigDetail
{
[Key]
[Column("RowID")]
public int RowId { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Column("EntityID")]
public int EntityId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("AccountID")]
public int AccountId { get; set; }
[Column("FinancialReportingID")]
public int FinancialReportingId { get; set; }
[Column("VariabilityID")]
public int VariabilityId { get; set; }
[Column("APEModelSectionID")]
public int ApemodelSectionId { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("ProjectionMethodID")]
public int ProjectionMethodId { get; set; }
public byte TrailingMonths { get; set; }
[Column("VersionID")]
public int VersionId { get; set; }
[ForeignKey("BudgetConfigGuid")]
[InverseProperty("GeneralLedgerInitialPlanConfigDetails")]
public virtual BudgetConfig BudgetConfig { get; set; } = null!;
}

View File

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "DepartmentId", "AccountId")]
[Table("GeneralLedgerSpreads", Schema = "fp")]
public partial class GeneralLedgerSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("AccountID")]
public int AccountId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("GeneralLedgerSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("InitialPlanRule", Schema = "fp")]
public partial class InitialPlanRule
{
[Key]
[Column("RowID")]
public int RowId { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Column("PlanSectionID")]
public int PlanSectionId { get; set; }
[Column("SubSectionID")]
public int SubSectionId { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("DimensionalityJSON")]
public string DimensionalityJson { get; set; } = null!;
[Column("ProjectionMethodID")]
public int ProjectionMethodId { get; set; }
public byte TrailingMonths { get; set; }
public int RulePriority { get; set; }
[Column("VersionID")]
public int? VersionId { get; set; }
[ForeignKey("BudgetConfigGuid")]
[InverseProperty("InitialPlanRules")]
public virtual BudgetConfig BudgetConfig { get; set; } = null!;
}

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("Lock")]
public partial class Lock
{
[Column("LockGUID")]
public Guid LockGuid { get; set; }
[Column("ItemGUID")]
public Guid ItemGuid { get; set; }
[Column("UserGUID")]
public Guid UserGuid { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateLocked { get; set; }
[StringLength(64)]
public string LockGroup { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime DateLastActive { get; set; }
[StringLength(256)]
public string UserName { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime DateLockedUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateLastActiveUtc { get; set; }
}

View File

@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("OnePlanPerformanceTestValidationResult", Schema = "fp")]
public partial class OnePlanPerformanceTestValidationResult
{
[Column("TestResultID")]
public int TestResultId { get; set; }
[Column("PlanSectionID")]
public int PlanSectionId { get; set; }
[Column("BasisID")]
public int BasisId { get; set; }
[StringLength(100)]
public string TableName { get; set; } = null!;
[StringLength(100)]
public string ColumnName { get; set; } = null!;
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal BeforeValue12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal AfterValue12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? Variance12 { get; set; }
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("PerformanceTestingSetting", Schema = "fp")]
[Index("Name", Name = "IX_PerformanceTestingSetting_Unique", IsUnique = true)]
public partial class PerformanceTestingSetting
{
[Key]
[Column("SystemSettingID")]
public int SystemSettingId { get; set; }
[StringLength(100)]
public string Name { get; set; } = null!;
[StringLength(400)]
public string Description { get; set; } = null!;
public string Value { get; set; } = null!;
public bool IsEditable { get; set; }
public int ColumnType { get; set; }
[StringLength(100)]
public string DefaultValue { get; set; } = null!;
public bool IsEncrypted { get; set; }
public DateOnly DateCreated { get; set; }
}

View File

@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "ProviderId", "ProviderLineItemId", "DepartmentId", "JobCodeId", "PayCodeGroupId", "UnitTypeId")]
[Table("ProviderCompensationSpreads", Schema = "fp")]
public partial class ProviderCompensationSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("ProviderID")]
public int ProviderId { get; set; }
[Key]
[Column("ProviderLineItemID")]
public int ProviderLineItemId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("JobCodeID")]
public int JobCodeId { get; set; }
[Key]
[Column("PayCodeGroupID")]
public int PayCodeGroupId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[Key]
[Column("UnitTypeID")]
public byte UnitTypeId { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("ProviderCompensationSpreads")]
public virtual DimDepartment Department { get; set; } = null!;
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("ProviderCompensationSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("SamplingLog", Schema = "fp")]
public partial class SamplingLog
{
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
[Column("PlanSectionID")]
public int PlanSectionId { get; set; }
[StringLength(300)]
public string PlanSectionDescription { get; set; } = null!;
[Column("SourceDimensionalityJSON")]
public string SourceDimensionalityJson { get; set; } = null!;
[Column("DateStartedUTC", TypeName = "datetime")]
public DateTime DateStartedUtc { get; set; }
[Column("DateEndedUTC", TypeName = "datetime")]
public DateTime DateEndedUtc { get; set; }
public bool IsInitialPlanMethod { get; set; }
[Column("IsDSSampling")]
public bool IsDssampling { get; set; }
public int NumberOfRecordsSampled { get; set; }
[StringLength(10)]
public string JazzVersion { get; set; } = null!;
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("ScheduledRefreshRequest", Schema = "fp")]
public partial class ScheduledRefreshRequest
{
[Key]
[Column("RequestGUID")]
public Guid RequestGuid { get; set; }
[Column("SourceDimensionalityJSON")]
public string SourceDimensionalityJson { get; set; } = null!;
[Column("SourceActionID")]
public short SourceActionId { get; set; }
public bool IsIgnoreTargetingError { get; set; }
[Column("EntityGroupConfigID")]
public int EntityGroupConfigId { get; set; }
[Column("SamplingJSON")]
public string SamplingJson { get; set; } = null!;
public int SortOrder { get; set; }
public bool IsActive { get; set; }
}

View File

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "EntityId", "ServiceLineId", "PatientClassId")]
[Table("ServiceLineEncounterSpreads", Schema = "fp")]
public partial class ServiceLineEncounterSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("EntityID")]
public int EntityId { get; set; }
[Key]
[Column("ServiceLineID")]
public int ServiceLineId { get; set; }
[Key]
[Column("PatientClassID")]
public int PatientClassId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("ServiceLineEncounterSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
[Table("SettingCategory", Schema = "fp")]
public partial class SettingCategory
{
[Column("SettingCategoryID")]
public int SettingCategoryId { get; set; }
[Column("CategoryID")]
public int CategoryId { get; set; }
[Column("SystemSettingID")]
public int SystemSettingId { get; set; }
[Column("BudgetConfigDefaultSettingID")]
public int BudgetConfigDefaultSettingId { get; set; }
}

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("SpreadHistory", Schema = "fp")]
public partial class SpreadHistory
{
[Key]
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column(TypeName = "datetime")]
public DateTime Date { get; set; }
[Column("AuthorGUID")]
public Guid AuthorGuid { get; set; }
public string AuthorFullName { get; set; } = null!;
public byte[]? ExcelFile { get; set; }
[InverseProperty("SpreadHistory")]
public virtual ICollection<BenefitsSpread> BenefitsSpreads { get; set; } = new List<BenefitsSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<ChargeVolumeSpread> ChargeVolumeSpreads { get; set; } = new List<ChargeVolumeSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<GeneralLedgerSpread> GeneralLedgerSpreads { get; set; } = new List<GeneralLedgerSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<ProviderCompensationSpread> ProviderCompensationSpreads { get; set; } = new List<ProviderCompensationSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<ServiceLineEncounterSpread> ServiceLineEncounterSpreads { get; set; } = new List<ServiceLineEncounterSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<StaffingSpread> StaffingSpreads { get; set; } = new List<StaffingSpread>();
[InverseProperty("SpreadHistory")]
public virtual ICollection<StatisticsSpread> StatisticsSpreads { get; set; } = new List<StatisticsSpread>();
}

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("StaffingInitialPlanConfigDetail", Schema = "fp")]
public partial class StaffingInitialPlanConfigDetail
{
[Key]
[Column("RowID")]
public int RowId { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
[Column("BudgetConfigID")]
public short BudgetConfigId { get; set; }
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Column("JobCodeID")]
public int JobCodeId { get; set; }
[Column("ProductiveClassID")]
public int ProductiveClassId { get; set; }
[Column("PayCodeGroupID")]
public int PayCodeGroupId { get; set; }
[Column("VariabilityID")]
public int VariabilityId { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("UnitTypeID")]
public byte UnitTypeId { get; set; }
[Column("EmployeeID")]
public int EmployeeId { get; set; }
[Column("ProviderID")]
public int ProviderId { get; set; }
[Column("ProviderLineItemID")]
public int ProviderLineItemId { get; set; }
[Column("ProviderTypeID")]
public int ProviderTypeId { get; set; }
[Column("ProviderSpecialtyID")]
public int ProviderSpecialtyId { get; set; }
[Column("ProjectionMethodID")]
public int ProjectionMethodId { get; set; }
public byte TrailingMonths { get; set; }
[Column("VersionID")]
public int VersionId { get; set; }
[ForeignKey("BudgetConfigGuid")]
[InverseProperty("StaffingInitialPlanConfigDetails")]
public virtual BudgetConfig BudgetConfig { get; set; } = null!;
}

View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "DepartmentId", "JobCodeId", "PayCodeGroupId")]
[Table("StaffingSpreads", Schema = "fp")]
public partial class StaffingSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("JobCodeID")]
public int JobCodeId { get; set; }
[Key]
[Column("PayCodeGroupID")]
public int PayCodeGroupId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("StaffingSpreads")]
public virtual DimDepartment Department { get; set; } = null!;
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("StaffingSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[PrimaryKey("BudgetConfigId", "DepartmentId", "AccountId", "ProviderId", "ProviderLineItemId")]
[Table("StatisticsSpreads", Schema = "fp")]
public partial class StatisticsSpread
{
[Key]
[Column("BudgetConfigID")]
public int BudgetConfigId { get; set; }
[Key]
[Column("DepartmentID")]
public int DepartmentId { get; set; }
[Key]
[Column("AccountID")]
public int AccountId { get; set; }
public bool IsInactive { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage01 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage02 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage03 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage04 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage05 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage06 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage07 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage08 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage09 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage10 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage11 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? SpreadPercentage12 { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal? TotalImportedValue { get; set; }
[Column("SpreadHistoryGUID")]
public Guid SpreadHistoryGuid { get; set; }
[Column("GlobalSpreadID")]
public int GlobalSpreadId { get; set; }
[Key]
[Column("ProviderID")]
public int ProviderId { get; set; }
[Key]
[Column("ProviderLineItemID")]
public int ProviderLineItemId { get; set; }
[ForeignKey("DepartmentId")]
[InverseProperty("StatisticsSpreads")]
public virtual DimDepartment Department { get; set; } = null!;
[ForeignKey("SpreadHistoryGuid")]
[InverseProperty("StatisticsSpreads")]
public virtual SpreadHistory SpreadHistory { get; set; } = null!;
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("SystemSetting", Schema = "fp")]
[Index("Name", Name = "IX_SystemSetting_Unique", IsUnique = true)]
public partial class SystemSetting
{
[Key]
[Column("SystemSettingID")]
public int SystemSettingId { get; set; }
[StringLength(100)]
public string Name { get; set; } = null!;
[StringLength(400)]
public string Description { get; set; } = null!;
public string Value { get; set; } = null!;
public bool IsEditable { get; set; }
public int ColumnType { get; set; }
[StringLength(100)]
public string DefaultValue { get; set; } = null!;
public bool IsEncrypted { get; set; }
public bool IsFeatureFlag { get; set; }
public DateOnly DateCreated { get; set; }
}

View File

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("TEScheduledTask")]
public partial class TescheduledTask
{
[Key]
[Column("ScheduledTaskGUID")]
public Guid ScheduledTaskGuid { get; set; }
[StringLength(64)]
public string Name { get; set; } = null!;
[StringLength(450)]
public string Description { get; set; } = null!;
public int RepeatType { get; set; }
public int RepeatFrequency { get; set; }
public int DayOfWeek { get; set; }
public int DayOfMonth { get; set; }
[Column(TypeName = "datetime")]
public DateTime StartDate { get; set; }
[Column(TypeName = "datetime")]
public DateTime EndDate { get; set; }
public bool HasEndDate { get; set; }
[Column("SetupXML")]
public string SetupXml { get; set; } = null!;
[StringLength(450)]
public string AssemblyQualifiedName { get; set; } = null!;
public bool HasRun { get; set; }
public bool IsDisabled { get; set; }
public bool HasDisabledExpirationDate { get; set; }
[Column(TypeName = "datetime")]
public DateTime DisabledExpirationDate { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime LastRunDateUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime LastSubmittedDateUtc { get; set; }
public TimeOnly StartTime { get; set; }
[StringLength(50)]
public string TimeZoneId { get; set; } = null!;
}

View File

@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Table("UserProfile")]
[Index("UserName", Name = "IX_UserProfile", IsUnique = true)]
public partial class UserProfile
{
[Key]
[Column("UserGUID")]
public Guid UserGuid { get; set; }
[StringLength(64)]
public string UserName { get; set; } = null!;
[StringLength(64)]
public string HashedPassword { get; set; } = null!;
[StringLength(64)]
public string NameFirst { get; set; } = null!;
[StringLength(64)]
public string NameLast { get; set; } = null!;
[StringLength(130)]
public string NameFull { get; set; } = null!;
[StringLength(450)]
public string EmailAddress { get; set; } = null!;
[StringLength(64)]
public string PhoneNumber { get; set; } = null!;
[Column("IsSysAdmin_DEPRECATED")]
public bool IsSysAdminDeprecated { get; set; }
[Column("AuthID")]
[StringLength(128)]
public string AuthId { get; set; } = null!;
public bool IsDisabled { get; set; }
[StringLength(64)]
public string BackupPassword { get; set; } = null!;
public byte DefaultAppModeLevel { get; set; }
[StringLength(64)]
public string BrowserVersion { get; set; } = null!;
[StringLength(512)]
public string UserAgent { get; set; } = null!;
[StringLength(64)]
[Unicode(false)]
public string Domain { get; set; } = null!;
[Column("HIPAADisclaimerStatus")]
public byte HipaadisclaimerStatus { get; set; }
[StringLength(450)]
public string Custom1 { get; set; } = null!;
[StringLength(450)]
public string Custom2 { get; set; } = null!;
[StringLength(450)]
public string Custom3 { get; set; } = null!;
[StringLength(450)]
public string Custom4 { get; set; } = null!;
public bool IsHidden { get; set; }
[StringLength(250)]
public string DotNetVersion { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime LastChangedPasswordUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime LastLoginDateUtc { get; set; }
public Guid Salt { get; set; }
public bool NeedsPasswordChange { get; set; }
}

View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
public partial class ViewReimbursementAdjustment
{
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
public byte AdjustmentType { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value { get; set; }
[Column("AdjustmentFilterJSON")]
public string AdjustmentFilterJson { get; set; } = null!;
[Column("GroupingHierarchyJSON")]
public string GroupingHierarchyJson { get; set; } = null!;
[StringLength(100)]
public string AdjustedProperty { get; set; } = null!;
public string Comment { get; set; } = null!;
[Column("AuthorGUID")]
public Guid AuthorGuid { get; set; }
[StringLength(260)]
public string AuthorFullName { get; set; } = null!;
[Column("GroupingGUID")]
public Guid GroupingGuid { get; set; }
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("ClassificationGroupID")]
public int ClassificationGroupId { get; set; }
[Column("ClassificationCategoryID")]
public int ClassificationCategoryId { get; set; }
public bool IsRecordDeleted { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime LastModifiedDateUtc { get; set; }
public string DimensionMemberJson { get; set; } = null!;
public int AffectedDataCount { get; set; }
[Column("UnitTypeID")]
public byte UnitTypeId { get; set; }
public bool IsCarryForward { get; set; }
[Column("AdjustmentID")]
public int AdjustmentId { get; set; }
[Column("BudgetPhaseID")]
public byte BudgetPhaseId { get; set; }
}

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
public partial class ViewStaffingAdjustment
{
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
public byte AdjustmentType { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value { get; set; }
[Column("AdjustmentFilterJSON")]
public string AdjustmentFilterJson { get; set; } = null!;
[Column("GroupingHierarchyJSON")]
public string GroupingHierarchyJson { get; set; } = null!;
[StringLength(100)]
public string AdjustedProperty { get; set; } = null!;
public string Comment { get; set; } = null!;
[Column("AuthorGUID")]
public Guid AuthorGuid { get; set; }
[StringLength(260)]
public string AuthorFullName { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime LastModifiedDateUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column("UnitTypeID")]
public byte UnitTypeId { get; set; }
[Column("GroupingGUID")]
public Guid GroupingGuid { get; set; }
[Column("ParentFilterJSON")]
public string ParentFilterJson { get; set; } = null!;
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("BudgetPhaseID")]
public byte BudgetPhaseId { get; set; }
[Column("ClassificationGroupID")]
public int ClassificationGroupId { get; set; }
[Column("ClassificationCategoryID")]
public int ClassificationCategoryId { get; set; }
public bool IsRecordDeleted { get; set; }
public string DimensionMemberJson { get; set; } = null!;
[Column("AdjustmentID")]
public int AdjustmentId { get; set; }
[Column("SubsectionID")]
public int SubsectionId { get; set; }
public bool IsErrored { get; set; }
}

View File

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Strata.Code.DataAccess.Models;
[Keyless]
public partial class ViewStatisticsAdjustment
{
[Column("AdjustmentGUID")]
public Guid AdjustmentGuid { get; set; }
[Column("BudgetConfigGUID")]
public Guid BudgetConfigGuid { get; set; }
public byte AdjustmentType { get; set; }
[Column(TypeName = "decimal(18, 0)")]
public decimal Value { get; set; }
[Column("AdjustmentFilterJSON")]
public string AdjustmentFilterJson { get; set; } = null!;
[Column("GroupingHierarchyJSON")]
public string GroupingHierarchyJson { get; set; } = null!;
[StringLength(100)]
public string AdjustedProperty { get; set; } = null!;
public string Comment { get; set; } = null!;
[Column("AuthorGUID")]
public Guid AuthorGuid { get; set; }
[StringLength(260)]
public string AuthorFullName { get; set; } = null!;
[Column(TypeName = "datetime")]
public DateTime LastModifiedDateUtc { get; set; }
[Column(TypeName = "datetime")]
public DateTime DateCreatedUtc { get; set; }
[Column("GroupingGUID")]
public Guid GroupingGuid { get; set; }
[Column("ParentFilterJSON")]
public string ParentFilterJson { get; set; } = null!;
[Column("TimeClassID")]
public byte TimeClassId { get; set; }
[Column("BudgetPhaseID")]
public byte BudgetPhaseId { get; set; }
[Column("ClassificationGroupID")]
public int ClassificationGroupId { get; set; }
[Column("ClassificationCategoryID")]
public int ClassificationCategoryId { get; set; }
public bool IsRecordDeleted { get; set; }
public string DimensionMemberJson { get; set; } = null!;
[Column("AdjustmentID")]
public int AdjustmentId { get; set; }
[Column("SubsectionID")]
public int SubsectionId { get; set; }
public bool IsErrored { get; set; }
}

View File

@ -0,0 +1,317 @@
# Migration Guide: Core20 ORM to EF Core 8.0
## Overview
This document outlines the process of migrating from the Core20 ORM system to Entity Framework Core 8.0, using the BudgetConfigDefaultSetting implementation as a reference example.
## Database Connection Management Comparison
### Core20 Approach
```csharp
// Core20 uses static SQL context and connection strings
static string SQL_QUERY_FROM = @"[fp].[BudgetConfigDefaultSetting] OBJ";
internal const string UPDATE_TABLE_NAME = "fp.BudgetConfigDefaultSetting";
```
- Uses static SQL contexts
- Manages connections through `SqlContext.Current`
- Relies on connection string keys
- Manual SQL query construction
- Schema is defined in SQL queries
### EF Core Approach
```csharp
public class OnePlanDbContext : DbContext
{
public DbSet<BudgetConfigDefaultSetting> BudgetConfigDefaultSettings { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<BudgetConfigDefaultSetting>(entity =>
{
entity.ToTable("BudgetConfigDefaultSetting", "fp");
// ... other configurations
});
}
}
```
- Connection management through DbContext
- Dependency injection for context lifecycle
- Fluent API for schema definition
- Type-safe queries
- Connection string in configuration
## ORM Feature Comparison
| Feature | Core20 | EF Core | Migration Effort |
|---------|--------|---------|------------------|
| Schema Definition | SQL Strings | Fluent API/Attributes | Medium |
| Query Building | String Concatenation | LINQ | High |
| Change Tracking | Manual (IsDirty) | Automatic | Low |
| Transactions | Manual | Built-in | Medium |
| Relationships | Manual Loading | Navigation Properties | High |
| Validation | Custom Implementation | Data Annotations/Custom | Medium |
| Bulk Operations | Custom SQL | Extensions Available | Medium |
| Security | Manual SQL Filters | Global Query Filters | Medium |
## Migration Steps
1. **Entity Class Migration**
```csharp
// From Core20:
[Serializable]
public partial class BudgetConfigDefaultSetting : ReadWriteBase<BudgetConfigDefaultSetting>
// To EF Core:
public class BudgetConfigDefaultSetting
{
public int SettingId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool DefaultValue { get; set; }
public DateOnly DateCreated { get; set; }
}
```
2. **Configuration Migration**
```csharp
public class BudgetConfigDefaultSettingConfiguration : IEntityTypeConfiguration<BudgetConfigDefaultSetting>
{
public void Configure(EntityTypeBuilder<BudgetConfigDefaultSetting> builder)
{
builder.ToTable("BudgetConfigDefaultSetting", "fp");
builder.HasKey(e => e.SettingId);
builder.Property(e => e.Name).IsRequired();
// ... other configurations
}
}
```
3. **Repository Pattern Implementation**
- Replace static loading methods with repository methods
- Convert SQL queries to LINQ expressions
- Implement unit of work pattern if needed
## Code Examples Comparison
### Loading Records
```csharp
// Core20
var records = BudgetConfigDefaultSetting.LoadByColumn("Name", "SomeName");
// EF Core
var records = await _repository.GetByNameAsync("SomeName");
```
### Saving Changes
```csharp
// Core20
setting.MarkDirty();
setting.Save();
// EF Core
await _repository.UpdateAsync(setting);
```
### Relationships
```csharp
// Core20
var linkedSettings = BudgetConfigDefaultSetting.LoadByLinks("LinkTable", "ColumnName", ids);
// EF Core
var linkedSettings = await _repository.GetByLinksAsync(
_context.Links.Where(l => ids.Contains(l.Id)),
link => link.SettingId
);
```
## Migration Effort Assessment
### High Effort Areas
1. **Query Conversion**
- Converting raw SQL to LINQ expressions
- Implementing type-safe joins
- Replacing string-based queries
2. **Relationship Management**
- Defining navigation properties
- Converting manual loading to eager/lazy loading
- Implementing proper relationship configurations
3. **Transaction Management**
- Replacing manual transaction handling
- Implementing unit of work pattern
- Managing context lifecycle
### Medium Effort Areas
1. **Schema Configuration**
- Converting SQL schema to Fluent API
- Setting up entity configurations
- Defining indexes and constraints
2. **Validation Logic**
- Implementing validation attributes
- Converting custom validation rules
- Setting up FluentValidation if needed
### Low Effort Areas
1. **Basic CRUD Operations**
- Converting simple load/save operations
- Implementing basic repository methods
- Setting up entity properties
## Best Practices for Migration
1. **Incremental Migration**
- Migrate one entity at a time
- Keep both systems running during migration
- Implement facade pattern for transition
2. **Testing Strategy**
- Create integration tests first
- Verify queries produce same results
- Test performance impact
3. **Performance Considerations**
- Use compiled queries for frequent operations
- Implement proper indexing
- Monitor query performance
4. **Security Migration**
- Replace manual SQL filters with Global Query Filters
- Implement proper user context
- Audit sensitive operations
## Tools and Utilities
1. **Essential Tools**
- EF Core Power Tools
- SQL Server Profiler
- dotnet ef CLI tools
2. **Recommended Extensions**
- EF Core Bulk Extensions
- AutoMapper
- FluentValidation
## AI Assistance for Migration
### Using AI Tools for Migration Support
The migration process can be significantly accelerated using Claude and WindSurf. Here's how to effectively leverage these tools:
### Using Claude for Architecture and Analysis
Claude excels at high-level analysis and providing detailed implementation guidance. Here are effective prompting strategies:
#### Example 1: Initial Analysis Prompt
```
I need to migrate a Core20 ORM implementation to EF Core 8.0. Here are my source files:
[Paste your Core20 files]
Please:
1. Analyze the current implementation
2. Identify key patterns and functionality
3. Propose an EF Core equivalent structure
4. Provide a sample implementation for one entity
5. List potential challenges and their solutions
```
#### Example 2: Detailed Implementation Prompt
```
Please help me implement the EF Core repository for this entity:
[Paste your entity class]
Requirements:
1. Maintain existing functionality
2. Use async/await pattern
3. Implement proper dependency injection
4. Include repository interface
5. Show example service layer integration
```
### Using WindSurf for Code Generation
WindSurf is particularly effective for handling specific code generation tasks. Here's how to use it effectively:
1. **Repository Migration**
```csharp
// WindSurf prompt:
// Generate EF Core repository for this Core20 entity:
// [Insert entity details]
```
2. **Entity Configuration**
```csharp
// WindSurf prompt:
// Create EF Core entity configuration class for:
// [Insert schema details]
```
### Best Practices for AI-Assisted Migration
1. **Preparation**
- Document all existing functionality
- Identify critical patterns
- Create test cases before migration
2. **Prompting Strategy**
- Use Claude for:
* Architecture decisions
* Pattern analysis
* Complex transformations
* Documentation generation
- Use WindSurf for:
* Code generation
* Schema translations
* LINQ query conversions
* Repetitive transformations
3. **Validation Process**
- Review AI-generated code thoroughly
- Test against existing functionality
- Verify performance characteristics
- Check security implications
### AI Tools Comparison for Migration Tasks
| Task | Claude | WindSurf | Best Practice |
|------|---------|---------------|---------------|
| Architecture Analysis | Excellent | Limited | Use Claude |
| Code Generation | Good | Excellent | Use WindSurf with Claude's guidance |
| Pattern Recognition | Excellent | Good | Start with Claude, implement with WindSurf |
| Documentation | Excellent | Limited | Use Claude |
| Edge Cases | Good | Good | Use both tools complementarily |
### Tool-Specific Best Practices
#### Claude
- Provide complete context
- Ask for step-by-step explanations
- Request multiple approaches
- Use for architectural decisions
#### WindSurf
- Focus on specific code generation tasks
- Use for repetitive transformations
- Leverage for LINQ query conversions
- Apply to schema migrations
### Recommended Workflow
1. **Analysis Phase (Claude)**
- System architecture review
- Pattern identification
- Migration strategy development
2. **Implementation Phase (WindSurf)**
- Code generation
- Entity configurations
- Repository implementations
3. **Validation Phase (Both)**
- Code review
- Test case execution
- Performance validation
## Conclusion
The migration from Core20 to EF Core represents a significant modernization effort that will result in more maintainable, type-safe, and performant code. By leveraging Claude for strategic planning and WindSurf for implementation, teams can significantly accelerate the migration process while maintaining high quality standards. The key is to use each tool's strengths appropriately and maintain a consistent validation process throughout the migration.

View File

@ -0,0 +1,112 @@
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Strata.Code.DataAccess.Data;
using Strata.Code.DataAccess.Models;
using Strata.Code.DataAccess.Repositories.Interfaces;
namespace Strata.Code.DataAccess.Repositories
{
public class BudgetConfigDefaultSettingRepository : IBudgetConfigDefaultSettingRepository
{
private readonly OnePlanDbContext _context;
public BudgetConfigDefaultSettingRepository(OnePlanDbContext context)
{
_context = context ?? throw new ArgumentNullException(nameof(context));
}
public async Task<IEnumerable<BudgetConfigDefaultSetting>> GetAllAsync()
{
return await _context.Set<BudgetConfigDefaultSetting>()
.OrderBy(x => x.SettingId)
.ToListAsync();
}
public async Task<IEnumerable<BudgetConfigDefaultSetting>> GetAllWithChildrenAsync()
{
// Since the original Core20 code shows no direct children,
// we keep this method for API consistency but it behaves same as GetAllAsync
return await GetAllAsync();
}
public async Task<BudgetConfigDefaultSetting?> GetByIdAsync(int id)
{
return await _context.Set<BudgetConfigDefaultSetting>()
.FirstOrDefaultAsync(x => x.SettingId == id);
}
public async Task<IEnumerable<BudgetConfigDefaultSetting>> GetByNameAsync(string name)
{
return await _context.Set<BudgetConfigDefaultSetting>()
.Where(x => x.Name == name)
.ToListAsync();
}
public async Task<IEnumerable<BudgetConfigDefaultSetting>> GetByIdsAsync(IEnumerable<int> ids)
{
return await _context.Set<BudgetConfigDefaultSetting>()
.Where(x => ids.Contains(x.SettingId))
.ToListAsync();
}
public async Task<BudgetConfigDefaultSetting> CreateAsync(BudgetConfigDefaultSetting setting)
{
setting.DateCreated = DateOnly.FromDateTime(DateTime.UtcNow);
await _context.Set<BudgetConfigDefaultSetting>().AddAsync(setting);
await _context.SaveChangesAsync();
return setting;
}
public async Task<BudgetConfigDefaultSetting?> UpdateAsync(BudgetConfigDefaultSetting setting)
{
var existingSetting = await GetByIdAsync(setting.SettingId);
if (existingSetting == null)
return null;
// Update properties
existingSetting.Name = setting.Name;
existingSetting.DefaultValue = setting.DefaultValue;
existingSetting.Description = setting.Description;
// EF Core tracks changes automatically
await _context.SaveChangesAsync();
return existingSetting;
}
public async Task<bool> DeleteAsync(int id)
{
var setting = await GetByIdAsync(id);
if (setting == null)
return false;
_context.Remove(setting);
await _context.SaveChangesAsync();
return true;
}
public async Task<IEnumerable<BudgetConfigDefaultSetting>> FindByAsync(
Expression<Func<BudgetConfigDefaultSetting, bool>> predicate)
{
return await _context.Set<BudgetConfigDefaultSetting>()
.Where(predicate)
.ToListAsync();
}
// Added validation method to match Core20's TryValidateSelf
public bool ValidateSetting(BudgetConfigDefaultSetting setting, out IList<string> errors)
{
errors = new List<string>();
if (string.IsNullOrWhiteSpace(setting.Name))
{
errors.Add("Name is required");
}
// Add any additional validation rules here
return !errors.Any();
}
}
}

View File

@ -0,0 +1,19 @@
using System.Linq.Expressions;
using Strata.Code.DataAccess.Models;
namespace Strata.Code.DataAccess.Repositories.Interfaces
{
public interface IBudgetConfigDefaultSettingRepository
{
Task<IEnumerable<BudgetConfigDefaultSetting>> GetAllAsync();
Task<IEnumerable<BudgetConfigDefaultSetting>> GetAllWithChildrenAsync();
Task<BudgetConfigDefaultSetting?> GetByIdAsync(int id);
Task<IEnumerable<BudgetConfigDefaultSetting>> GetByNameAsync(string name);
Task<IEnumerable<BudgetConfigDefaultSetting>> GetByIdsAsync(IEnumerable<int> ids);
Task<BudgetConfigDefaultSetting> CreateAsync(BudgetConfigDefaultSetting setting);
Task<BudgetConfigDefaultSetting?> UpdateAsync(BudgetConfigDefaultSetting setting);
Task<bool> DeleteAsync(int id);
Task<IEnumerable<BudgetConfigDefaultSetting>> FindByAsync(Expression<Func<BudgetConfigDefaultSetting, bool>> predicate);
bool ValidateSetting(BudgetConfigDefaultSetting setting, out IList<string> errors);
}
}

View File

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.12">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.12">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@ -0,0 +1,114 @@
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
using Strata.Code.Business.Services.Interfaces;
using Strata.Code.DataAccess.Models;
namespace Strata.Code.Web.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class BudgetConfigDefaultSettingController : ControllerBase
{
private readonly IBudgetConfigDefaultSettingService _service;
public BudgetConfigDefaultSettingController(IBudgetConfigDefaultSettingService service)
{
_service = service ?? throw new ArgumentNullException(nameof(service));
}
[HttpGet]
[ProducesResponseType(typeof(IEnumerable<BudgetConfigDefaultSettingDto>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetAll()
{
var settings = await _service.GetAllAsync();
return Ok(settings);
}
[HttpGet("{id}")]
[ProducesResponseType(typeof(BudgetConfigDefaultSettingDto), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> GetById(int id)
{
var setting = await _service.GetByIdAsync(id);
if (setting == null)
return NotFound();
return Ok(setting);
}
[HttpPost]
[ProducesResponseType(typeof(BudgetConfigDefaultSettingDto), StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Create([FromBody] BudgetConfigDefaultSettingDto setting)
{
if (!ModelState.IsValid)
return BadRequest(ModelState);
var createdSetting = await _service.CreateAsync(setting);
return CreatedAtAction(nameof(GetById), new { id = createdSetting.SettingId }, createdSetting);
}
[HttpPut("{id}")]
[ProducesResponseType(typeof(BudgetConfigDefaultSettingDto), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Update(int id, [FromBody] BudgetConfigDefaultSettingDto setting)
{
if (id != setting.SettingId)
return BadRequest();
var updatedSetting = await _service.UpdateAsync(setting);
if (updatedSetting == null)
return NotFound();
return Ok(updatedSetting);
}
[HttpDelete("{id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> Delete(int id)
{
var result = await _service.DeleteAsync(id);
if (!result)
return NotFound();
return NoContent();
}
[HttpGet("byname/{name}")]
[ProducesResponseType(typeof(IEnumerable<BudgetConfigDefaultSettingDto>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetByName(string name)
{
var settings = await _service.GetByNameAsync(name);
return Ok(settings);
}
[HttpPost("byids")]
[ProducesResponseType(typeof(IEnumerable<BudgetConfigDefaultSettingDto>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetByIds([FromBody] IEnumerable<int> ids)
{
var settings = await _service.GetByIdsAsync(ids);
return Ok(settings);
}
[HttpPost("search")]
[ProducesResponseType(typeof(IEnumerable<BudgetConfigDefaultSettingDto>), StatusCodes.Status200OK)]
public async Task<IActionResult> FindBy([FromBody] string predicateExpression)
{
// Note: In a real implementation, you'd want to create a more structured search model
// This is just an example of how you might expose the FindBy functionality
var predicate = BuildPredicate(predicateExpression);
var settings = await _service.FindByAsync(predicate);
return Ok(settings);
}
private Expression<Func<BudgetConfigDefaultSetting, bool>> BuildPredicate(string expression)
{
// This is a simplified example - in practice, you'd want to implement
// a more robust expression parser or use a different approach for searching
return setting => setting.Name.Contains(expression) ||
setting.Description.Contains(expression);
}
}
}

View File

@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.OpenApi.Models;
using Strata.Code.DataAccess.Repositories.Interfaces;
using Strata.Code.DataAccess.Repositories;
using System.Reflection;
using Strata.Code.Business.Services;
using Strata.Code.Business.Services.Interfaces;
using Strata.Code.DataAccess.Data;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Budget Config API",
Version = "v1",
Description = "API for managing budget configuration default settings"
});
// Include XML comments in Swagger documentation
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath);
});
// Add your DbContext configuration here
builder.Services.AddDbContext<OnePlanDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IBudgetConfigDefaultSettingRepository, BudgetConfigDefaultSettingRepository>();
builder.Services.AddScoped<IBudgetConfigDefaultSettingService, BudgetConfigDefaultSettingService>();
var app = builder.Build();
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
{
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Budget Config API V1");
});
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@ -0,0 +1,51 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:27409",
"sslPort": 44329
}
},
"profiles": {
"http_Development": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"http_Staging": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7241;http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Strata.Code.Business\Strata.Code.Business.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st_dev_database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
}

View File

@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st-database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -0,0 +1,64 @@
@echo off
cd ..\src\Strata.Code.DataAccess
dotnet ef dbcontext scaffold^
"Server=54.71.217.228,1433;Database=st-database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"^
Microsoft.EntityFrameworkCore.SqlServer^
--project Strata.Code.DataAccess.csproj^
--context-dir Data^
--output-dir Models^
--context OnePlanDbContext^
--force^
--data-annotations^
--no-onconfiguring^
-t fp.AddProviderEncountersDataForCharges^
-t fp.AddProviderSummary^
-t fp.AdjustmentChunkingConfiguration^
-t fp.APEDepartmentWorkflowStatus^
-t fp.APEWorkflow^
-t fp.BenefitsSpreads^
-t fp.BudgetConfig^
-t fp.BudgetConfigDefaultSetting^
-t fp.BudgetConfigSetting^
-t fp.BudgetRefreshRequest^
-t fp.BudgetRefreshRequestHistory^
-t fp.ChargeVolumeAddProviderAdjustment^
-t fp.ChargeVolumeSpreads^
-t fp.DataRefreshTargetThreshold^
-t fp.DepartmentChargeVolumeAdjustment^
-t fp.DepartmentConfig^
-t fp.DimCategory^
-t fw.DimDepartment^
-t dss.DimPhysician^
-t fp.EngineLog^
-t fp.EntityGroupConfig^
-t fp.FixChangeHistoryRequest^
-t fp.GeneralLedger^
-t fp.GeneralLedgerInitialPlanConfigDetail^
-t fp.GeneralLedgerSpreads^
-t fp.InitialPlanRule^
-t dbo.LOCK^
-t dbo.log^
-t dbo.OnePlanPerformanceTestHistory^
-t fp.OnePlanPerformanceTestValidationResult^
-t fp.PerformanceTestingSetting^
-t fp.ProviderCompensationSpreads^
-t fp.SamplingLog^
-t fp.ScheduledRefreshRequest^
-t fp.ServiceLineEncounterSpreads^
-t fp.SettingCategory^
-t fp.SpreadHistory^
-t fp.StaffingInitialPlanConfigDetail^
-t fp.StaffingSpreads^
-t fp.StatisticsSpreads^
-t fp.SystemSetting^
-t dbo.TEScheduledTask^
-t dbo.UserProfile^
-t fp.viewBenefitsAdjustment^
-t fp.viewDepartmentChargeVolumeAdjustment^
-t fp.viewGeneralLedgerAdjustment^
-t fp.viewReimbursementAdjustment^
-t fp.viewReimbursementGeneralLedgerAdjustment^
-t fp.viewServiceLineEncounterAdjustment^
-t fp.viewStaffingAdjustment^
-t fp.viewStatisticsAdjustment
pause

View File

@ -0,0 +1,107 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Security.Cryptography;
using System;
namespace Strata.Base.Internal.Tests.Security
{
[TestClass]
public class SecurityUtilsTests
{
[TestMethod]
public void EncryptValue_WithValidInput_EncryptsAndDecryptsCorrectly()
{
// Arrange
string originalValue = "test value";
string key = "testkey12345678"; // AES requires at least a 128-bit (16-byte) key
// Act
string encryptedValue = SecurityUtils.EncryptValue(originalValue, key);
string decryptedValue = SecurityUtils.DecryptValue(encryptedValue, key);
// Assert
Assert.AreEqual(originalValue, decryptedValue);
}
[TestMethod]
public void DecryptValue_WithWrongKey_ThrowsException()
{
// Arrange
string originalValue = "test value";
string correctKey = "testkey12345678"; // AES requires at least a 128-bit (16-byte) key
string wrongKey = "wrongkey12345678";
// Act
string encryptedValue = SecurityUtils.EncryptValue(originalValue, correctKey);
// Assert
Assert.ThrowsException<CryptographicException>(() => SecurityUtils.DecryptValue(encryptedValue, wrongKey));
}
[TestMethod]
public void EncryptValue_WithEmptyString_ReturnsEmptyString()
{
// Arrange
string originalValue = "";
string key = "testkey12345678";
// Act
string encryptedValue = SecurityUtils.EncryptValue(originalValue, key);
// Assert
Assert.AreEqual("", encryptedValue);
}
[TestMethod]
public void DecryptValue_WithEmptyString_ReturnsEmptyString()
{
// Arrange
string encryptedValue = "";
string key = "testkey12345678";
// Act
string decryptedValue = SecurityUtils.DecryptValue(encryptedValue, key);
// Assert
Assert.AreEqual("", decryptedValue);
}
[TestMethod]
public void EncryptValue_WithNullString_ReturnsNull()
{
// Arrange
var originalValue = null as string;
string key = "testkey12345678";
// Act
string encryptedValue = SecurityUtils.EncryptValue(originalValue, key);
// Assert
Assert.IsNull(encryptedValue);
}
[TestMethod]
public void DecryptValue_WithNullString_ReturnsNull()
{
// Arrange
var encryptedValue = null as string;
string key = "testkey12345678";
// Act
string decryptedValue = SecurityUtils.DecryptValue(encryptedValue, key);
// Assert
Assert.IsNull(decryptedValue);
}
[TestMethod]
public void DecryptValue_WithInvalidBase64_ThrowsException()
{
// Arrange
string invalidBase64 = "Not a valid base64 string";
string key = "testkey12345678";
// Assert
Assert.ThrowsException<FormatException>(() => SecurityUtils.DecryptValue(invalidBase64, key));
}
}
}

View File

@ -0,0 +1,71 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Strata.Base.Internal.Encryptors;
using System;
using System.Configuration;
namespace Strata.Base.Internal.Tests.Security
{
[TestClass]
public class UberEncryptionMethodTests
{
private const string TestOrgPin = "12345";
private const string TestKey = "TestKey123";
private const string TestUsername = "testuser";
private const string TestPassword = "password123";
private static readonly Guid TestUserGuid = Guid.NewGuid();
private const string TestSalt = "testsalt";
[TestInitialize]
public void Setup()
{
// Set up the configuration key for testing
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Remove("UberMonetKey");
config.AppSettings.Settings.Add("UberMonetKey", TestKey);
config.Save();
ConfigurationManager.RefreshSection("appSettings");
}
[TestMethod]
public void Encode_ReturnsExpectedLength()
{
// Arrange
var encryptor = new UberEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreEqual(6, result.Length, "UberMonet hash should be 6 characters long");
}
[TestMethod]
public void Encode_SameInputProducesSameOutput()
{
// Arrange
var encryptor = new UberEncryptionMethod();
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreEqual(result1, result2, "Same input should produce same hash");
}
[TestMethod]
public void Encode_DifferentOrgPinsProduceDifferentOutputs()
{
// Arrange
var encryptor = new UberEncryptionMethod();
string differentOrgPin = "54321";
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, differentOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreNotEqual(result1, result2, "Different OrgPins should produce different hashes");
}
}
}

View File

@ -0,0 +1,106 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Strata.Base.Internal.Encryptors;
using System;
using System.Configuration;
namespace Strata.Base.Internal.Tests.Security
{
[TestClass]
public class UserGUIDEncryptionMethodTests
{
private const string TestUsername = "testuser";
private const string TestOrgPin = "12345";
private const string TestPassword = "password123";
private static readonly Guid TestUserGuid = Guid.NewGuid();
private const string TestSalt = "testsalt";
private const string TestKey = "TestKey123";
[TestInitialize]
public void Setup()
{
// Set up the configuration key for testing
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Remove("UserGuidEncryptionKey");
config.AppSettings.Settings.Add("UserGuidEncryptionKey", TestKey);
config.Save();
ConfigurationManager.RefreshSection("appSettings");
}
[TestMethod]
public void Encode_ReturnsNonEmptyString()
{
// Arrange
var encryptor = new UserGUIDEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Encoded result should not be empty");
}
[TestMethod]
public void Encode_SameInputProducesSameOutput()
{
// Arrange
var encryptor = new UserGUIDEncryptionMethod();
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreEqual(result1, result2, "Same input should produce same hash");
}
[TestMethod]
public void Encode_DifferentPasswordsProduceDifferentOutputs()
{
// Arrange
var encryptor = new UserGUIDEncryptionMethod();
string differentPassword = "differentpassword123";
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, differentPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreNotEqual(result1, result2, "Different passwords should produce different hashes");
}
[TestMethod]
public void Encode_DifferentUserGUIDsProduceDifferentOutputs()
{
// Arrange
var encryptor = new UserGUIDEncryptionMethod();
Guid differentGuid = Guid.NewGuid();
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, differentGuid, TestSalt);
// Assert
Assert.AreNotEqual(result1, result2, "Different UserGUIDs should produce different hashes");
}
[TestMethod]
public void Encode_OutputIsBase64String()
{
// Arrange
var encryptor = new UserGUIDEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
try
{
Convert.FromBase64String(result);
}
catch (Exception ex)
{
Assert.Fail($"Result should be a valid Base64 string. Error: {ex.Message}");
}
}
}
}

View File

@ -0,0 +1,255 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Strata.Base.Internal.Encryptors;
using System;
using System.Configuration;
using System.Text;
namespace Strata.Base.Internal.Tests.Security
{
[TestClass]
public class UserSaltEncryptionMethodTests
{
private const string TestUsername = "testuser";
private const string TestOrgPin = "12345";
private const string TestPassword = "password123";
private static readonly Guid TestUserGuid = Guid.NewGuid();
private const string TestSalt = "testsalt";
private const string TestKey = "TestKey123";
[TestInitialize]
public void Setup()
{
// Set up the configuration key for testing
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Remove("UserSaltEncryptionKey");
config.AppSettings.Settings.Add("UserSaltEncryptionKey", TestKey);
config.Save();
ConfigurationManager.RefreshSection("appSettings");
}
[TestMethod]
public void Encode_ReturnsNonEmptyString()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Encoded result should not be empty");
}
[TestMethod]
public void Encode_SameInputProducesSameOutput()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreEqual(result1, result2, "Same input should produce same hash");
}
[TestMethod]
public void Encode_DifferentPasswordsProduceDifferentOutputs()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string differentPassword = "differentpassword123";
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, differentPassword, TestUserGuid, TestSalt);
// Assert
Assert.AreNotEqual(result1, result2, "Different passwords should produce different hashes");
}
[TestMethod]
public void Encode_DifferentSaltsProduceDifferentOutputs()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string differentSalt = "differentsalt";
// Act
string result1 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
string result2 = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, differentSalt);
// Assert
Assert.AreNotEqual(result1, result2, "Different salts should produce different hashes");
}
[TestMethod]
public void Encode_OutputIsBase64String()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
// Assert
try
{
Convert.FromBase64String(result);
}
catch (Exception ex)
{
Assert.Fail($"Result should be a valid Base64 string. Error: {ex.Message}");
}
}
[TestMethod]
public void Encode_OutputHasExpectedLength()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, TestSalt);
byte[] decodedBytes = Convert.FromBase64String(result);
// Assert
Assert.AreEqual(24, decodedBytes.Length, "Output should be 24 bytes (192 bits)");
}
[TestMethod]
public void Encode_WithEmptyPassword_ReturnsValidHash()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, "", TestUserGuid, TestSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Empty password should still produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithEmptySalt_ReturnsValidHash()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, "");
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Empty salt should still produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithLongPassword_HandlesCorrectly()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string longPassword = new string('a', 1000000); // 1MB password
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, longPassword, TestUserGuid, TestSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Long password should produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithLongSalt_HandlesCorrectly()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string longSalt = new string('a', 1000000); // 1MB salt
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, longSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Long salt should produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithSpecialCharacters_HandlesCorrectly()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string specialCharsPassword = "!@#$%^&*()_+-=[]{}|;:'\",.<>?/~`";
string specialCharsSalt = "!@#$%^&*()_+-=[]{}|;:'\",.<>?/~`";
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, specialCharsPassword, TestUserGuid, specialCharsSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Special characters should produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithUnicodeCharacters_HandlesCorrectly()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
string unicodePassword = "Hello 世界! Привет мир! 안녕하세요!";
string unicodeSalt = "Salt 世界! Соль! 소금!";
// Act
string result = encryptor.Encode(TestUsername, TestOrgPin, unicodePassword, TestUserGuid, unicodeSalt);
// Assert
Assert.IsFalse(string.IsNullOrEmpty(result), "Unicode characters should produce a hash");
Assert.AreEqual(24, Convert.FromBase64String(result).Length, "Hash should still be 24 bytes");
}
[TestMethod]
public void Encode_WithNullSalt_ThrowsArgumentNullException()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Assert
Assert.ThrowsException<ArgumentNullException>(() =>
encryptor.Encode(TestUsername, TestOrgPin, TestPassword, TestUserGuid, null));
}
[TestMethod]
public void Encode_WithNullPassword_ThrowsArgumentNullException()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Assert
Assert.ThrowsException<ArgumentNullException>(() =>
encryptor.Encode(TestUsername, TestOrgPin, null, TestUserGuid, TestSalt));
}
[TestMethod]
public void Encode_WithNullUsername_ThrowsArgumentNullException()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Assert
Assert.ThrowsException<ArgumentNullException>(() =>
encryptor.Encode(null, TestOrgPin, TestPassword, TestUserGuid, TestSalt));
}
[TestMethod]
public void Encode_WithNullOrgPin_ThrowsArgumentNullException()
{
// Arrange
var encryptor = new UserSaltEncryptionMethod();
// Assert
Assert.ThrowsException<ArgumentNullException>(() =>
encryptor.Encode(TestUsername, null, TestPassword, TestUserGuid, TestSalt));
}
}
}

View File

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<AssemblyName>Strata.Base.Internal.Tests</AssemblyName>
<RootNamespace>Strata.Base.Internal.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Strata.Base.Internal\Strata.Base.Internal.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<AssemblyName>Strata.Base.Internal.Tests</AssemblyName>
<RootNamespace>Strata.Base.Internal.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Strata.Base.Internal\Strata.Base.Internal.vbproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Strata.Base.Internal", "Strata.Base.Internal\Strata.Base.Internal.csproj", "{6948FC8A-673B-0B97-11F1-2FBDDF225514}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Strata.Base.Internal.Tests", "Strata.Base.Internal.Tests\Strata.Base.Internal.Tests.csproj", "{11111111-1111-1111-1111-111111111111}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6948FC8A-673B-0B97-11F1-2FBDDF225514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6948FC8A-673B-0B97-11F1-2FBDDF225514}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6948FC8A-673B-0B97-11F1-2FBDDF225514}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6948FC8A-673B-0B97-11F1-2FBDDF225514}.Release|Any CPU.Build.0 = Release|Any CPU
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5C6D0F1F-E91E-4F6A-9E9F-B3E2DA7F2B4D}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.0.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Strata.Base.Internal", "Strata.Base.Internal\Strata.Base.Internal.vbproj", "{DB6C7DE1-AB63-4466-93A9-E5C3BDB561B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Strata.Base.Internal.Tests", "Strata.Base.Internal.Tests\Strata.Base.Internal.Tests.csproj", "{11111111-1111-1111-1111-111111111111}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DB6C7DE1-AB63-4466-93A9-E5C3BDB561B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB6C7DE1-AB63-4466-93A9-E5C3BDB561B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB6C7DE1-AB63-4466-93A9-E5C3BDB561B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB6C7DE1-AB63-4466-93A9-E5C3BDB561B4}.Release|Any CPU.Build.0 = Release|Any CPU
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11111111-1111-1111-1111-111111111111}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5C6D0F1F-E91E-4F6A-9E9F-B3E2DA7F2B4D}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,13 @@
using System;
namespace Strata.Base.Internal.Encryptors
{
public interface IPasswordEncryptionMethod
{
string Encode(string username, string anOrgPin, string aNewPassword, Guid aUserGUID, string aSalt);
}
}

View File

@ -0,0 +1,56 @@
using System;
using System.Configuration;
using Microsoft.VisualBasic;
using Strata.Configuration.Client.Models.Jazz;
namespace Strata.Base.Internal.Encryptors
{
public class UberEncryptionMethod : IPasswordEncryptionMethod
{
public UberEncryptionMethod()
{
}
#region Methods
public static string GetUberMonet(string anOrgPin)
{
return GetUberMonet(DateTime.Today, anOrgPin, ConfigurationManager.AppSettings[nameof(StrataJazzOptions.UberMonetKey)]);
}
private static string GetUberMonet(DateTime aDate, string anOrgPIN, string aKey)
{
var ha = new EncryptionUtils.Hasher(EncryptionUtils.Hasher.Provider.SHA256);
string lsHashBefore;
string lsResult;
lsHashBefore = Strings.Format(aDate, "dd-MM-yyyy") + "-" + anOrgPIN + "-" + aKey;
var d = new EncryptionUtils.Data(lsHashBefore);
var dResult = ha.Calculate(d);
lsResult = Strings.Left(dResult.Hex, 6);
ha = null;
return lsResult;
}
#endregion
#region IPasswordEncryptionMethod
public string Encode(string username, string anOrgPin, string aNewPassword, Guid aUserGUID, string aSalt)
{
return GetUberMonet(anOrgPin);
}
#endregion
}
}

View File

@ -1,4 +1,4 @@
Imports System.Configuration Imports System.Configuration
Imports Strata.Configuration.Client.Models.Jazz Imports Strata.Configuration.Client.Models.Jazz
Namespace Encryptors Namespace Encryptors
@ -6,7 +6,7 @@ Namespace Encryptors
Public Class UberEncryptionMethod Public Class UberEncryptionMethod
Implements IPasswordEncryptionMethod Implements IPasswordEncryptionMethod
Friend Sub New() Public Sub New()
End Sub End Sub
@ -17,7 +17,7 @@ Namespace Encryptors
End Function End Function
Private Shared Function GetUberMonet(ByVal aDate As Date, ByVal anOrgPIN As String, ByVal aKey As String) As String Private Shared Function GetUberMonet(ByVal aDate As Date, ByVal anOrgPIN As String, ByVal aKey As String) As String
Dim ha As New EncryptionUtils.Hasher(EncryptionUtils.Hasher.Provider.SHA1) Dim ha As New EncryptionUtils.Hasher(EncryptionUtils.Hasher.Provider.SHA256)
Dim lsHashBefore As String Dim lsHashBefore As String
Dim lsResult As String Dim lsResult As String
@ -38,7 +38,7 @@ Namespace Encryptors
#Region " IPasswordEncryptionMethod " #Region " IPasswordEncryptionMethod "
Private Function Encode(ByVal username As String, ByVal anOrgPin As String, ByVal aNewPassword As String, ByVal aUserGUID As System.Guid, aSalt As String) As String Implements IPasswordEncryptionMethod.Encode Public Function Encode(ByVal username As String, ByVal anOrgPin As String, ByVal aNewPassword As String, ByVal aUserGUID As System.Guid, aSalt As String) As String Implements IPasswordEncryptionMethod.Encode
Return GetUberMonet(anOrgPin) Return GetUberMonet(anOrgPin)
End Function End Function

View File

@ -0,0 +1,52 @@
using System;
using System.Configuration;
using System.Security.Cryptography;
using System.Text;
using Strata.Configuration.Client.Models.Jazz;
namespace Strata.Base.Internal.Encryptors
{
public class UserGUIDEncryptionMethod : IPasswordEncryptionMethod
{
#region Declarations
private const int NUMBER_ITERATIONS = 100000;
#endregion
#region Methods
public string Encode(string username, string anOrgPin, string aNewPassword, Guid aUserGUID, string aSalt)
{
string salt = aUserGUID.ToString() + ConfigurationManager.AppSettings[nameof(StrataJazzOptions.UserGuidEncryptionKey)];
string result = GetHashedValue(aNewPassword, salt);
for (int i = 1; i <= NUMBER_ITERATIONS; i++)
result = GetHashedValue(result);
return result;
}
private static string GetHashedValue(string aValue)
{
// Create an instance of the sha encrypter
using (HashAlgorithm hasher = SHA256.Create())
{
return Convert.ToBase64String(hasher.ComputeHash(Encoding.UTF8.GetBytes(aValue)));
}
}
private static string GetHashedValue(string aValue, string aSalt)
{
return GetHashedValue(aValue + aSalt);
}
#endregion
}
}

View File

@ -1,4 +1,4 @@
Imports System.Configuration Imports System.Configuration
Imports System.Security.Cryptography Imports System.Security.Cryptography
Imports System.Text Imports System.Text
Imports Strata.Configuration.Client.Models.Jazz Imports Strata.Configuration.Client.Models.Jazz
@ -30,7 +30,7 @@ Namespace Encryptors
Private Shared Function GetHashedValue(ByVal aValue As String) As String Private Shared Function GetHashedValue(ByVal aValue As String) As String
'Create an instance of the sha encrypter 'Create an instance of the sha encrypter
Using hasher As New SHA1Managed Using hasher As HashAlgorithm = SHA256.Create()
Return Convert.ToBase64String(hasher.ComputeHash(Encoding.UTF8.GetBytes(aValue))) Return Convert.ToBase64String(hasher.ComputeHash(Encoding.UTF8.GetBytes(aValue)))
End Using End Using

View File

@ -0,0 +1,65 @@
using System;
using System.Configuration;
using System.Security.Cryptography;
using System.Text;
using Strata.Configuration.Client.Models.Jazz;
namespace Strata.Base.Internal.Encryptors
{
public class UserSaltEncryptionMethod : IPasswordEncryptionMethod
{
#region Declarations
private const int NUMBER_ITERATIONS = 100000;
#endregion
#region Methods
public string Encode(string username, string anOrgPin, string aNewPassword, Guid aUserGUID, string aSalt)
{
if (username is null)
{
throw new ArgumentNullException(nameof(username));
}
if (anOrgPin is null)
{
throw new ArgumentNullException(nameof(anOrgPin));
}
if (aNewPassword is null)
{
throw new ArgumentNullException(nameof(aNewPassword));
}
if (aSalt is null)
{
throw new ArgumentNullException(nameof(aSalt));
}
// Get encryption key from config, throw if not found
string encryptionKey = ConfigurationManager.AppSettings[nameof(StrataJazzOptions.UserSaltEncryptionKey)];
if (string.IsNullOrEmpty(encryptionKey))
{
throw new ConfigurationErrorsException("UserSaltEncryptionKey not found in configuration");
}
// Combine salt with encryption key
string saltAndPepper = aSalt + encryptionKey;
// Use UTF8 encoding to properly handle Unicode characters
using (var deriveBytes = new Rfc2898DeriveBytes(aNewPassword, Encoding.UTF8.GetBytes(saltAndPepper), NUMBER_ITERATIONS, HashAlgorithmName.SHA256))
{
byte[] password = deriveBytes.GetBytes(24);
return Convert.ToBase64String(password);
}
}
#endregion
}
}

View File

@ -1,4 +1,4 @@
Imports System.Configuration Imports System.Configuration
Imports System.Security.Cryptography Imports System.Security.Cryptography
Imports System.Text Imports System.Text
Imports Strata.Configuration.Client.Models.Jazz Imports Strata.Configuration.Client.Models.Jazz
@ -17,16 +17,38 @@ Namespace Encryptors
#Region " Methods " #Region " Methods "
Public Function Encode(ByVal username As String, ByVal anOrgPin As String, ByVal aNewPassword As String, ByVal aUserGUID As System.Guid, aSalt As String) As String Implements IPasswordEncryptionMethod.Encode Public Function Encode(ByVal username As String, ByVal anOrgPin As String, ByVal aNewPassword As String, ByVal aUserGUID As System.Guid, aSalt As String) As String Implements IPasswordEncryptionMethod.Encode
Dim saltAndPepper As String = aSalt & ConfigurationManager.AppSettings(NameOf(StrataJazzOptions.UserSaltEncryptionKey)) If username Is Nothing Then
Throw New ArgumentNullException(NameOf(username))
End If
Using deriveBytes As Rfc2898DeriveBytes = New Rfc2898DeriveBytes(aNewPassword, Encoding.UTF8.GetBytes(saltAndPepper), NUMBER_ITERATIONS) If anOrgPin Is Nothing Then
Throw New ArgumentNullException(NameOf(anOrgPin))
End If
If aNewPassword Is Nothing Then
Throw New ArgumentNullException(NameOf(aNewPassword))
End If
If aSalt Is Nothing Then
Throw New ArgumentNullException(NameOf(aSalt))
End If
' Get encryption key from config, throw if not found
Dim encryptionKey As String = ConfigurationManager.AppSettings(NameOf(StrataJazzOptions.UserSaltEncryptionKey))
If String.IsNullOrEmpty(encryptionKey) Then
Throw New ConfigurationErrorsException("UserSaltEncryptionKey not found in configuration")
End If
' Combine salt with encryption key
Dim saltAndPepper As String = aSalt & encryptionKey
' Use UTF8 encoding to properly handle Unicode characters
Using deriveBytes As Rfc2898DeriveBytes = New Rfc2898DeriveBytes(aNewPassword, Encoding.UTF8.GetBytes(saltAndPepper), NUMBER_ITERATIONS, HashAlgorithmName.SHA256)
Dim password As Byte() = deriveBytes.GetBytes(24) Dim password As Byte() = deriveBytes.GetBytes(24)
Return Convert.ToBase64String(password) Return Convert.ToBase64String(password)
End Using End Using
End Function End Function
#End Region #End Region
End Class End Class

View File

@ -0,0 +1,11 @@

namespace Strata.Base.Internal
{
internal class InternalConstants
{
// WARNING: This should always match the value in Strata.Base.Constants.XConstants.APPLICATION_VERSION
public const string APPLICATION_VERSION = "2025.11";
}
}

View File

@ -0,0 +1,11 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

View File

@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
// Review the values of the assembly attributes
[assembly: AssemblyTitle("Strata.Biz.Internal")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("Strata Decision Technology, LLC")]
[assembly: AssemblyProduct("Strata.Biz.Internal")]
[assembly: AssemblyCopyright("© 2006-2012 Strata Decision Technology, LLC")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("dfd98904-a580-4549-90ea-95c9a5504029")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// <Assembly: AssemblyVersion(Strata.Base.Constants.XConstants.APPLICATION_VERSION)>
[assembly: AssemblyVersion(Strata.Base.Internal.InternalConstants.APPLICATION_VERSION)]
[assembly: AssemblyFileVersion(Strata.Base.Internal.InternalConstants.APPLICATION_VERSION)]

View File

@ -0,0 +1,468 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using Microsoft.VisualBasic;
/* TODO ERROR: Skipped IfDirectiveTrivia
#If TARGET = "module" AndAlso _MYTYPE = "" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYTYPE="Empty"
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYTYPE = "WindowsForms" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYFORMS = True
#Const _MYWEBSERVICES = True
#Const _MYUSERTYPE = "Windows"
#Const _MYCOMPUTERTYPE = "Windows"
#Const _MYAPPLICATIONTYPE = "WindowsForms"
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "WindowsFormsWithCustomSubMain" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYFORMS = True
#Const _MYWEBSERVICES = True
#Const _MYUSERTYPE = "Windows"
#Const _MYCOMPUTERTYPE = "Windows"
#Const _MYAPPLICATIONTYPE = "Console"
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "Windows" OrElse _MYTYPE = "" Then
*/
/* TODO ERROR: Skipped DefineDirectiveTrivia
#Const _MYWEBSERVICES = True
*//* TODO ERROR: Skipped DefineDirectiveTrivia
#Const _MYUSERTYPE = "Windows"
*//* TODO ERROR: Skipped DefineDirectiveTrivia
#Const _MYCOMPUTERTYPE = "Windows"
*//* TODO ERROR: Skipped DefineDirectiveTrivia
#Const _MYAPPLICATIONTYPE = "Windows"
*/
/* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "Console" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYWEBSERVICES = True
#Const _MYUSERTYPE = "Windows"
#Const _MYCOMPUTERTYPE = "Windows"
#Const _MYAPPLICATIONTYPE = "Console"
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "Web" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYFORMS = False
#Const _MYWEBSERVICES = False
#Const _MYUSERTYPE = "Web"
#Const _MYCOMPUTERTYPE = "Web"
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "WebControl" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYFORMS = False
#Const _MYWEBSERVICES = True
#Const _MYUSERTYPE = "Web"
#Const _MYCOMPUTERTYPE = "Web"
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE = "Custom" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYTYPE <> "Empty" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const _MYTYPE = "Empty"
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYTYPE <> "Empty" Then
*/
namespace Strata.Base.Internal.My
{
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYAPPLICATIONTYPE = "WindowsForms" OrElse _MYAPPLICATIONTYPE = "Windows" OrElse _MYAPPLICATIONTYPE = "Console" Then
*/
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYAPPLICATIONTYPE = "WindowsForms" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
Inherits Global.Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
#If TARGET = "winexe" Then
<Global.System.STAThread(), Global.System.Diagnostics.DebuggerHidden(), Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Shared Sub Main(ByVal Args As String())
Try
Global.System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(MyApplication.UseCompatibleTextRendering())
Finally
End Try
My.Application.Run(Args)
End Sub
#End If
*//* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYAPPLICATIONTYPE = "Windows" Then
*/
internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.ApplicationBase
{
/* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYAPPLICATIONTYPE = "Console" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
Inherits Global.Microsoft.VisualBasic.ApplicationServices.ConsoleApplicationBase
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If '_MYAPPLICATIONTYPE = "WindowsForms"
*/
}
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If '#If _MYAPPLICATIONTYPE = "WindowsForms" Or _MYAPPLICATIONTYPE = "Windows" or _MYAPPLICATIONTYPE = "Console"
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYCOMPUTERTYPE <> "" Then
*/
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYCOMPUTERTYPE = "Windows" Then
*/
internal partial class MyComputer : Microsoft.VisualBasic.Devices.Computer
{
/* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYCOMPUTERTYPE = "Web" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
Inherits Global.Microsoft.VisualBasic.Devices.ServerComputer
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
[DebuggerHidden()]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public MyComputer() : base()
{
}
}
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
[HideModuleName()]
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
internal static class MyProject
{
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYCOMPUTERTYPE <> "" Then
*/
[System.ComponentModel.Design.HelpKeyword("My.Computer")]
internal static MyComputer Computer
{
[DebuggerHidden()]
get
{
return m_ComputerObjectProvider.GetInstance;
}
}
private readonly static ThreadSafeObjectProvider<MyComputer> m_ComputerObjectProvider = new ThreadSafeObjectProvider<MyComputer>();
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYAPPLICATIONTYPE = "Windows" Or _MYAPPLICATIONTYPE = "WindowsForms" Or _MYAPPLICATIONTYPE = "Console" Then
*/
[System.ComponentModel.Design.HelpKeyword("My.Application")]
internal static MyApplication Application
{
[DebuggerHidden()]
get
{
return m_AppObjectProvider.GetInstance;
}
}
private readonly static ThreadSafeObjectProvider<MyApplication> m_AppObjectProvider = new ThreadSafeObjectProvider<MyApplication>();
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYUSERTYPE = "Windows" Then
*/
[System.ComponentModel.Design.HelpKeyword("My.User")]
internal static Microsoft.VisualBasic.ApplicationServices.User User
{
[DebuggerHidden()]
get
{
return m_UserObjectProvider.GetInstance;
}
}
private readonly static ThreadSafeObjectProvider<Microsoft.VisualBasic.ApplicationServices.User> m_UserObjectProvider = new ThreadSafeObjectProvider<Microsoft.VisualBasic.ApplicationServices.User>();
/* TODO ERROR: Skipped ElifDirectiveTrivia
#ElseIf _MYUSERTYPE = "Web" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
<Global.System.ComponentModel.Design.HelpKeyword("My.User")> _
Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return m_UserObjectProvider.GetInstance()
End Get
End Property
Private ReadOnly m_UserObjectProvider As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser)
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYFORMS = True Then
*//* TODO ERROR: Skipped DisabledTextTrivia
#Const STARTUP_MY_FORM_FACTORY = "My.MyProject.Forms"
<Global.System.ComponentModel.Design.HelpKeyword("My.Forms")> _
Friend ReadOnly Property Forms() As MyForms
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return m_MyFormsObjectProvider.GetInstance()
End Get
End Property
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
<Global.Microsoft.VisualBasic.MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")> _
Friend NotInheritable Class MyForms
<Global.System.Diagnostics.DebuggerHidden()> _
Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Forms.Form})(ByVal Instance As T) As T
If Instance Is Nothing OrElse Instance.IsDisposed Then
If m_FormBeingCreated IsNot Nothing Then
If m_FormBeingCreated.ContainsKey(GetType(T)) = True Then
Throw New Global.System.InvalidOperationException(Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_RecursiveFormCreate"))
End If
Else
m_FormBeingCreated = New Global.System.Collections.Hashtable()
End If
m_FormBeingCreated.Add(GetType(T), Nothing)
Try
Return New T()
Catch ex As Global.System.Reflection.TargetInvocationException When ex.InnerException IsNot Nothing
Dim BetterMessage As String = Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_SeeInnerException", ex.InnerException.Message)
Throw New Global.System.InvalidOperationException(BetterMessage, ex.InnerException)
Finally
m_FormBeingCreated.Remove(GetType(T))
End Try
Else
Return Instance
End If
End Function
<Global.System.Diagnostics.DebuggerHidden()> _
Private Sub Dispose__Instance__(Of T As Global.System.Windows.Forms.Form)(ByRef instance As T)
instance.Dispose()
instance = Nothing
End Sub
<Global.System.Diagnostics.DebuggerHidden()> _
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Public Sub New()
MyBase.New()
End Sub
<Global.System.ThreadStatic()> Private Shared m_FormBeingCreated As Global.System.Collections.Hashtable
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function Equals(ByVal o As Object) As Boolean
Return MyBase.Equals(o)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function GetHashCode() As Integer
Return MyBase.GetHashCode
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> _
Friend Overloads Function [GetType]() As Global.System.Type
Return GetType(MyForms)
End Function
<Global.System.ComponentModel.EditorBrowsable(Global.System.ComponentModel.EditorBrowsableState.Never)> Public Overrides Function ToString() As String
Return MyBase.ToString
End Function
End Class
Private m_MyFormsObjectProvider As New ThreadSafeObjectProvider(Of MyForms)
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYWEBSERVICES = True Then
*/
[System.ComponentModel.Design.HelpKeyword("My.WebServices")]
internal static MyWebServices WebServices
{
[DebuggerHidden()]
get
{
return m_MyWebServicesObjectProvider.GetInstance;
}
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")]
internal sealed class MyWebServices
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[DebuggerHidden()]
public override bool Equals(object o)
{
return base.Equals(o);
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[DebuggerHidden()]
public override int GetHashCode()
{
return base.GetHashCode();
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[DebuggerHidden()]
internal new Type GetType()
{
return typeof(MyWebServices);
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[DebuggerHidden()]
public override string ToString()
{
return base.ToString();
}
[DebuggerHidden()]
private static T Create__Instance__<T>(T instance) where T : new()
{
if (instance is null)
{
return new T();
}
else
{
return instance;
}
}
[DebuggerHidden()]
private void Dispose__Instance__<T>(ref T instance)
{
instance = default;
}
[DebuggerHidden()]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public MyWebServices() : base()
{
}
}
private readonly static ThreadSafeObjectProvider<MyWebServices> m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider<MyWebServices>();
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
/* TODO ERROR: Skipped IfDirectiveTrivia
#If _MYTYPE = "Web" Then
*//* TODO ERROR: Skipped DisabledTextTrivia
<Global.System.ComponentModel.Design.HelpKeyword("My.Request")> _
Friend ReadOnly Property Request() As Global.System.Web.HttpRequest
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
If CurrentContext IsNot Nothing Then
Return CurrentContext.Request
End If
Return Nothing
End Get
End Property
<Global.System.ComponentModel.Design.HelpKeyword("My.Response")> _
Friend ReadOnly Property Response() As Global.System.Web.HttpResponse
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
If CurrentContext IsNot Nothing Then
Return CurrentContext.Response
End If
Return Nothing
End Get
End Property
<Global.System.ComponentModel.Design.HelpKeyword("My.Application.Log")> _
Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog
<Global.System.Diagnostics.DebuggerHidden()> _
Get
Return m_LogObjectProvider.GetInstance()
End Get
End Property
Private ReadOnly m_LogObjectProvider As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog)
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If '_MYTYPE="Web"
*/
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Runtime.InteropServices.ComVisible(false)]
internal sealed class ThreadSafeObjectProvider<T> where T : new()
{
internal T GetInstance
{
/* TODO ERROR: Skipped IfDirectiveTrivia
#If TARGET = "library" Then
*/
[DebuggerHidden()]
get
{
var Value = m_Context.Value;
if (Value is null)
{
Value = new T();
m_Context.Value = Value;
}
return Value;
}
/* TODO ERROR: Skipped ElseDirectiveTrivia
#Else
*//* TODO ERROR: Skipped DisabledTextTrivia
<Global.System.Diagnostics.DebuggerHidden()> _
Get
If m_ThreadStaticValue Is Nothing Then m_ThreadStaticValue = New T
Return m_ThreadStaticValue
End Get
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
}
[DebuggerHidden()]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public ThreadSafeObjectProvider() : base()
{
}
/* TODO ERROR: Skipped IfDirectiveTrivia
#If TARGET = "library" Then
*/
private readonly Microsoft.VisualBasic.MyServices.Internal.ContextValue<T> m_Context = new Microsoft.VisualBasic.MyServices.Internal.ContextValue<T>();
/* TODO ERROR: Skipped ElseDirectiveTrivia
#Else
*//* TODO ERROR: Skipped DisabledTextTrivia
<Global.System.Runtime.CompilerServices.CompilerGenerated(), Global.System.ThreadStatic()> Private Shared m_ThreadStaticValue As T
*//* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/
}
}
}
/* TODO ERROR: Skipped EndIfDirectiveTrivia
#End If
*/

View File

@ -0,0 +1,241 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml.Linq;
using Microsoft.VisualBasic;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// See Compiler::LoadXmlSolutionExtension
namespace Strata.Base.Internal.My
{
[Embedded()]
[DebuggerNonUserCode()]
[System.Runtime.CompilerServices.CompilerGenerated()]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
internal sealed class InternalXmlHelper
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
private InternalXmlHelper()
{
}
public static string get_Value(IEnumerable<XElement> source)
{
foreach (XElement item in source)
return item.Value;
return null;
}
public static void set_Value(IEnumerable<XElement> source, string value)
{
foreach (XElement item in source)
{
item.Value = value;
break;
}
}
public static string get_AttributeValue(IEnumerable<XElement> source, XName name)
{
foreach (XElement item in source)
return (string)item.Attribute(name);
return null;
}
public static void set_AttributeValue(IEnumerable<XElement> source, XName name, string value)
{
foreach (XElement item in source)
{
item.SetAttributeValue(name, value);
break;
}
}
public static string get_AttributeValue(XElement source, XName name)
{
return (string)source.Attribute(name);
}
public static void set_AttributeValue(XElement source, XName name, string value)
{
source.SetAttributeValue(name, value);
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static XAttribute CreateAttribute(XName name, object value)
{
if (value is null)
{
return null;
}
return new XAttribute(name, value);
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static XAttribute CreateNamespaceAttribute(XName name, XNamespace ns)
{
var a = new XAttribute(name, ns.NamespaceName);
a.AddAnnotation(ns);
return a;
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static object RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, object obj)
{
if (obj is not null)
{
XElement elem = obj as XElement;
if (elem is not null)
{
return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elem);
}
else
{
IEnumerable elems = obj as IEnumerable;
if (elems is not null)
{
return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elems);
}
}
}
return obj;
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static IEnumerable RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, IEnumerable obj)
{
if (obj is not null)
{
IEnumerable<XElement> elems = obj as IEnumerable<XElement>;
if (elems is not null)
{
return elems.Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessXElement);
}
else
{
return obj.Cast<object>().Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessObject);
}
}
return obj;
}
[DebuggerNonUserCode()]
[System.Runtime.CompilerServices.CompilerGenerated()]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
private sealed class RemoveNamespaceAttributesClosure
{
private readonly string[] m_inScopePrefixes;
private readonly XNamespace[] m_inScopeNs;
private readonly List<XAttribute> m_attributes;
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
internal RemoveNamespaceAttributesClosure(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes)
{
m_inScopePrefixes = inScopePrefixes;
m_inScopeNs = inScopeNs;
m_attributes = attributes;
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
internal XElement ProcessXElement(XElement elem)
{
return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem);
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
internal object ProcessObject(object obj)
{
XElement elem = obj as XElement;
if (elem is not null)
{
return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem);
}
else
{
return obj;
}
}
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static XElement RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, XElement e)
{
if (e is not null)
{
var a = e.FirstAttribute;
while (a is not null)
{
var nextA = a.NextAttribute;
if (a.IsNamespaceDeclaration)
{
var ns = a.Annotation<XNamespace>();
string prefix = a.Name.LocalName;
if (ns is not null)
{
if (inScopePrefixes is not null && inScopeNs is not null)
{
int lastIndex = inScopePrefixes.Length - 1;
for (int i = 0, loopTo = lastIndex; i <= loopTo; i++)
{
string currentInScopePrefix = inScopePrefixes[i];
var currentInScopeNs = inScopeNs[i];
if (prefix.Equals(currentInScopePrefix))
{
if (ns == currentInScopeNs)
{
// prefix and namespace match. Remove the unneeded ns attribute
a.Remove();
}
// prefix is in scope but refers to something else. Leave the ns attribute.
a = null;
break;
}
}
}
if (a is not null)
{
// Prefix is not in scope
// Now check whether it's going to be in scope because it is in the attributes list
if (attributes is not null)
{
int lastIndex = attributes.Count - 1;
for (int i = 0, loopTo1 = lastIndex; i <= loopTo1; i++)
{
var currentA = attributes[i];
string currentInScopePrefix = currentA.Name.LocalName;
var currentInScopeNs = currentA.Annotation<XNamespace>();
if (currentInScopeNs is not null)
{
if (prefix.Equals(currentInScopePrefix))
{
if (ns == currentInScopeNs)
{
// prefix and namespace match. Remove the unneeded ns attribute
a.Remove();
}
// prefix is in scope but refers to something else. Leave the ns attribute.
a = null;
break;
}
}
}
}
if (a is not null)
{
// Prefix is definitely not in scope
a.Remove();
// namespace is not defined either. Add this attributes list
attributes.Add(a);
}
}
}
}
a = nextA;
}
}
return e;
}
}
}

View File

@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Microsoft.VisualBasic
{
[Embedded()]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Module | AttributeTargets.Assembly, Inherited = false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Runtime.CompilerServices.CompilerGenerated()]
internal sealed class Embedded : Attribute
{
}
}

View File

@ -0,0 +1,70 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
using System.Diagnostics;
using Microsoft.VisualBasic;
namespace Strata.Base.Internal.My.Resources
{
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[DebuggerNonUserCode()]
[System.Runtime.CompilerServices.CompilerGenerated()]
[HideModuleName()]
internal static class Resources
{
private static System.Resources.ResourceManager resourceMan;
private static System.Globalization.CultureInfo resourceCulture;
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager
{
get
{
if (ReferenceEquals(resourceMan, null))
{
var temp = new System.Resources.ResourceManager("Strata.Base.Internal.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More