Add project files.
This commit is contained in:
57
Core.Blueprint.SQLServer/Contracts/IBaseSQLAdapter.cs
Normal file
57
Core.Blueprint.SQLServer/Contracts/IBaseSQLAdapter.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user