using System.ComponentModel.DataAnnotations;
using NodaTime;
namespace DysonNetwork.Common.Models;
///
/// Base class for all entity models in the system.
/// Provides common properties and functionality for tracking entity lifecycle.
///
public abstract class ModelBase
{
///
/// Gets or sets the unique identifier for the entity.
///
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
///
/// Gets or sets the date and time when the entity was created, in UTC.
///
public Instant CreatedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
///
/// Gets or sets the date and time when the entity was last updated, in UTC.
///
public Instant UpdatedAt { get; set; } = SystemClock.Instance.GetCurrentInstant();
///
/// Gets or sets the date and time when the entity was soft-deleted, in UTC.
/// Null if the entity has not been deleted.
///
public Instant? DeletedAt { get; set; }
}