erp-platform/api/src/Erp.Platform.Application.Contracts/DeveloperKit/DynamicServiceDtos.cs

151 lines
4.1 KiB
C#
Raw Normal View History

2025-11-11 19:49:52 +00:00
using System;
2025-11-04 22:08:36 +00:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Volo.Abp.Application.Dtos;
2025-11-11 19:49:52 +00:00
namespace Erp.Platform.DeveloperKit;
2025-11-04 22:08:36 +00:00
/// <summary>
2025-11-12 12:59:31 +00:00
/// Dynamic AppService tanımı DTO'su
2025-11-04 22:08:36 +00:00
/// </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; }
2025-11-05 13:17:10 +00:00
/// <summary>
2025-11-12 12:59:31 +00:00
/// Yüklenen assembly (sadece server-side kullanım için, JSON'a serialize edilmez)
2025-11-05 13:17:10 +00:00
/// </summary>
[System.Text.Json.Serialization.JsonIgnore]
public System.Reflection.Assembly LoadedAssembly { get; set; }
2025-11-04 22:08:36 +00:00
}
/// <summary>
2025-11-12 12:59:31 +00:00
/// Tek bir derleme hatası
2025-11-04 22:08:36 +00:00
/// </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>
2025-11-12 12:59:31 +00:00
/// AppService yayınlama DTO'su
2025-11-04 22:08:36 +00:00
/// </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>
2025-11-12 12:59:31 +00:00
/// AppService yayınlama sonucu
2025-11-04 22:08:36 +00:00
/// </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; }
}
2025-11-11 19:49:52 +00:00