Core.BluePrint.Packages/Core.Blueprint.SQLServer/Contracts/IBaseSQLAdapter.cs
Sergio Matias Urquin 83fc1878c4 Add project files.
2025-04-29 18:42:29 -06:00

58 lines
1.8 KiB
C#

using Core.Blueprint.SQLServer.Entities;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Core.Blueprint.SQLServer
{
/// <summary>
/// Defines the interface for SQL Server entities, providing common properties for auditing and state management.
/// </summary>
public interface IBaseSQLAdapter
{
/// <summary>
/// Gets or sets the identifier for the entity.
/// </summary>
[Key]
[JsonPropertyName("id")]
int Id { get; }
/// <summary>
/// Gets or sets the GUID for the entity.
/// </summary>
[JsonPropertyName("guid")]
string Guid { get; }
/// <summary>
/// Gets or sets the timestamp when the entity was created.
/// </summary>
[JsonPropertyName("createdAt")]
DateTime? CreatedAt { get; }
/// <summary>
/// Gets or sets the identifier of the user or system that created the entity.
/// </summary>
[JsonPropertyName("createdBy")]
string? CreatedBy { get; set; }
/// <summary>
/// Gets or sets the timestamp when the entity was last updated.
/// </summary>
[JsonPropertyName("updatedAt")]
DateTime? UpdatedAt { get; set; }
/// <summary>
/// Gets or sets the identifier of the user or system that last updated the entity.
/// </summary>
[JsonPropertyName("updatedBy")]
string? UpdatedBy { get; set; }
/// <summary>
/// Gets or sets the status of the entity, indicating whether it is active, inactive, or in another state.
/// </summary>
[JsonPropertyName("status")]
[JsonConverter(typeof(JsonStringEnumConverter))]
StatusEnum Status { get; set; }
}
}