Добавьте файлы проекта.

This commit is contained in:
FrigaT
2026-01-05 00:29:19 +03:00
committed by FrigaT
parent 76a09d80d4
commit d0653c2098
105 changed files with 6729 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
using SQLVision.Core.Enums;
using System.Text.Json.Serialization;
namespace SQLVision.Core.Models;
public class ScriptMetadata
{
[JsonPropertyName("id")]
public string Id { get; set; } = Guid.NewGuid().ToString();
[JsonPropertyName("fileName")]
public string FileName { get; set; } = string.Empty;
[JsonPropertyName("fullPath")]
public string FullPath { get; set; } = string.Empty;
[JsonPropertyName("description")]
public string? Description { get; set; }
[JsonPropertyName("rawSql")]
public string RawSql { get; set; } = string.Empty;
[JsonPropertyName("processedSql")]
public string ProcessedSql { get; set; } = string.Empty;
[JsonPropertyName("connectionString")]
public string? ConnectionString { get; set; }
[JsonPropertyName("databaseProvider")]
public DatabaseProvider DatabaseProvider { get; set; } = DatabaseProvider.SqlServer;
[JsonPropertyName("parameters")]
public List<ScriptParameter> Parameters { get; set; } = new();
[JsonPropertyName("outputs")]
public List<OutputDefinition> Outputs { get; set; } = new();
[JsonPropertyName("metadata")]
public Dictionary<string, object> Metadata { get; set; } = new();
[JsonPropertyName("lastModified")]
public DateTime LastModified { get; set; } = DateTime.UtcNow;
[JsonPropertyName("category")]
public string? Category { get; set; }
[JsonPropertyName("tags")]
public List<string> Tags { get; set; } = new();
[JsonPropertyName("executionCount")]
public int ExecutionCount { get; set; }
[JsonPropertyName("averageExecutionTime")]
public TimeSpan AverageExecutionTime { get; set; }
[JsonIgnore]
public string DisplayName => !string.IsNullOrEmpty(Description)
? Description
: Path.GetFileNameWithoutExtension(FileName);
[JsonIgnore]
public bool IsVisible { get; set; } = true;
}