erp-platform/api/src/Erp.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs
2025-11-12 15:59:31 +03:00

150 lines
4.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.DeveloperKit;
/// <summary>
/// Dynamic AppService tanımı DTO'su
/// </summary>
public class DynamicServiceDto : FullAuditedEntityDto<Guid>
{
[StringLength(256)]
[JsonPropertyName("name")]
public string Name { get; set; }
[StringLength(512)]
[JsonPropertyName("displayName")]
public string DisplayName { get; set; }
[StringLength(2000)]
[JsonPropertyName("description")]
public string Description { get; set; }
[JsonPropertyName("code")]
public string Code { get; set; }
[JsonPropertyName("isActive")]
public bool IsActive { get; set; }
[JsonPropertyName("compilationStatus")]
public string CompilationStatus { get; set; }
[JsonPropertyName("lastCompilationError")]
public string LastCompilationError { get; set; }
[JsonPropertyName("lastSuccessfulCompilation")]
public DateTime? LastSuccessfulCompilation { get; set; }
[JsonPropertyName("version")]
public int Version { get; set; }
[JsonPropertyName("codeHash")]
public string CodeHash { get; set; }
[JsonPropertyName("primaryEntityType")]
public string PrimaryEntityType { get; set; }
[JsonPropertyName("controllerName")]
public string ControllerName { get; set; }
}
/// <summary>
/// Kod derleme sonucu DTO'su
/// </summary>
public class CompileResultDto
{
[JsonPropertyName("success")]
public bool Success { get; set; }
[JsonPropertyName("errorMessage")]
public string ErrorMessage { get; set; }
[JsonPropertyName("errors")]
public List<CompilationErrorDto> Errors { get; set; }
[JsonPropertyName("compilationTimeMs")]
public long CompilationTimeMs { get; set; }
[JsonPropertyName("hasWarnings")]
public bool HasWarnings { get; set; }
[JsonPropertyName("warnings")]
public List<string> Warnings { get; set; }
/// <summary>
/// Yüklenen assembly (sadece server-side kullanım için, JSON'a serialize edilmez)
/// </summary>
[System.Text.Json.Serialization.JsonIgnore]
public System.Reflection.Assembly LoadedAssembly { get; set; }
}
/// <summary>
/// Tek bir derleme hatası
/// </summary>
public class CompilationErrorDto
{
[JsonPropertyName("code")]
public string Code { get; set; }
[JsonPropertyName("message")]
public string Message { get; set; }
[JsonPropertyName("line")]
public int Line { get; set; }
[JsonPropertyName("column")]
public int Column { get; set; }
[JsonPropertyName("severity")]
public string Severity { get; set; }
[JsonPropertyName("fileName")]
public string FileName { get; set; }
}
/// <summary>
/// Kod test etme DTO'su
/// </summary>
public class TestCompileRequestDto
{
[JsonPropertyName("code")]
public string Code { get; set; }
}
/// <summary>
/// AppService yayınlama DTO'su
/// </summary>
public class PublishAppServiceRequestDto
{
[StringLength(256)]
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("code")]
public string Code { get; set; }
[StringLength(512)]
[JsonPropertyName("displayName")]
public string DisplayName { get; set; }
[StringLength(2000)]
[JsonPropertyName("description")]
public string Description { get; set; }
[StringLength(256)]
[JsonPropertyName("primaryEntityType")]
public string PrimaryEntityType { get; set; }
}
/// <summary>
/// AppService yayınlama sonucu
/// </summary>
public class PublishResultDto
{
[JsonPropertyName("success")]
public bool Success { get; set; }
[JsonPropertyName("errorMessage")]
public string ErrorMessage { get; set; }
[JsonPropertyName("appServiceId")]
public Guid? AppServiceId { get; set; }
[JsonPropertyName("swaggerUrl")]
public string SwaggerUrl { get; set; }
[JsonPropertyName("generatedEndpoints")]
public List<string> GeneratedEndpoints { get; set; }
[JsonPropertyName("controllerName")]
public string ControllerName { get; set; }
}