using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.DeveloperKit;
///
/// Dynamic AppService tanımı DTO'su
///
public class DynamicServiceDto : FullAuditedEntityDto
{
[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; }
}
///
/// Kod derleme sonucu DTO'su
///
public class CompileResultDto
{
[JsonPropertyName("success")]
public bool Success { get; set; }
[JsonPropertyName("errorMessage")]
public string ErrorMessage { get; set; }
[JsonPropertyName("errors")]
public List Errors { get; set; }
[JsonPropertyName("compilationTimeMs")]
public long CompilationTimeMs { get; set; }
[JsonPropertyName("hasWarnings")]
public bool HasWarnings { get; set; }
[JsonPropertyName("warnings")]
public List Warnings { get; set; }
///
/// Yüklenen assembly (sadece server-side kullanım için, JSON'a serialize edilmez)
///
[System.Text.Json.Serialization.JsonIgnore]
public System.Reflection.Assembly LoadedAssembly { get; set; }
}
///
/// Tek bir derleme hatası
///
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; }
}
///
/// Kod test etme DTO'su
///
public class TestCompileRequestDto
{
[JsonPropertyName("code")]
public string Code { get; set; }
}
///
/// AppService yayınlama DTO'su
///
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; }
}
///
/// AppService yayınlama sonucu
///
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 GeneratedEndpoints { get; set; }
[JsonPropertyName("controllerName")]
public string ControllerName { get; set; }
}