erp-platform/api/src/Kurs.Platform.Application.Contracts/DeveloperKit/CustomEntityDto.cs
Sedat Öztürk 14afb6181f Düzenleme
2025-08-11 00:39:45 +03:00

59 lines
2 KiB
C#

using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
namespace Kurs.Platform.DeveloperKit;
public class CustomEntityDto : FullAuditedEntityDto<Guid>
{
public string Name { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public string TableName { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsActive { get; set; } = true;
public bool HasAuditFields { get; set; } = true;
public bool HasSoftDelete { get; set; } = true;
public string MigrationStatus { get; set; } = "pending";
public Guid? MigrationId { get; set; }
public string EndpointStatus { get; set; } = "pending";
public List<EntityFieldDto> Fields { get; set; } = [];
}
public class CreateUpdateCustomEntityDto
{
public string Name { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public string TableName { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsActive { get; set; } = true;
public bool HasAuditFields { get; set; } = true;
public bool HasSoftDelete { get; set; } = true;
public List<CreateUpdateCustomEntityFieldDto> Fields { get; set; } = [];
}
public class EntityFieldDto : FullAuditedEntityDto<Guid>
{
public Guid EntityId { get; set; }
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public bool IsRequired { get; set; }
public int? MaxLength { get; set; }
public bool IsUnique { get; set; }
public string? DefaultValue { get; set; }
public string? Description { get; set; }
}
public class CreateUpdateCustomEntityFieldDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public bool IsRequired { get; set; }
public int? MaxLength { get; set; }
public bool IsUnique { get; set; }
public string? DefaultValue { get; set; }
public string? Description { get; set; }
}