2025-08-11 06:34:44 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Volo.Abp.Domain.Entities.Auditing;
|
|
|
|
|
|
using Volo.Abp.MultiTenancy;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Kurs.Platform.Entities;
|
|
|
|
|
|
|
|
|
|
|
|
public class CustomEntity : FullAuditedEntity<Guid>, IMultiTenant
|
|
|
|
|
|
{
|
|
|
|
|
|
public virtual Guid? TenantId { get; protected set; }
|
2025-10-07 11:19:12 +00:00
|
|
|
|
|
2025-08-11 06:34:44 +00:00
|
|
|
|
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"; // "pending" | "applied" | "failed"
|
|
|
|
|
|
|
|
|
|
|
|
public virtual ICollection<CustomEntityField> Fields { get; set; } = [];
|
|
|
|
|
|
|
|
|
|
|
|
public CustomEntity()
|
|
|
|
|
|
{
|
|
|
|
|
|
Id = Guid.NewGuid(); // Burada erişim mümkün çünkü sınıfın içi
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class CustomEntityField : FullAuditedEntity<Guid>
|
|
|
|
|
|
{
|
|
|
|
|
|
public Guid EntityId { get; set; } = Guid.NewGuid();
|
|
|
|
|
|
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; }
|
2025-10-31 08:30:04 +00:00
|
|
|
|
public int DisplayOrder { get; set; } = 0;
|
2025-08-11 06:34:44 +00:00
|
|
|
|
|
|
|
|
|
|
public virtual CustomEntity Entity { get; set; } = null!;
|
|
|
|
|
|
|
|
|
|
|
|
public CustomEntityField()
|
|
|
|
|
|
{
|
|
|
|
|
|
Id = Guid.NewGuid(); // Burada erişim mümkün çünkü sınıfın içi
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|