using CashLineERP.SharedKernel.Abstractions;

namespace CashLineERP.Domain.Common;

public abstract class Entity : IAuditableEntity
{
    public DateTime CreatedAtUtc { get; protected set; } = DateTime.UtcNow;

    public long? CreatedByUserId { get; protected set; }

    public DateTime? UpdatedAtUtc { get; protected set; }

    public long? UpdatedByUserId { get; protected set; }

    public void Touch(long? updatedByUserId)
    {
        UpdatedAtUtc = DateTime.UtcNow;
        UpdatedByUserId = updatedByUserId;
    }
}

