using System;
using System.ComponentModel.DataAnnotations;

namespace Rdh.ElectronicMedicineKit.Models
{
    public interface IEntity<T>
    {
        T Id { get; set; }
    }

    public abstract class RootEntity : IEntity<Guid>
    {
        [Key]
        public Guid Id { get; set; } = Guid.NewGuid();
        public Guid? Creator { get; set; }
        public DateTime CreationTime { get; set; }
        public Guid? Modifier { get; set; }
        public DateTime? LastModificationTime { get; set; }
        public bool IsDeleted { get; set; }
        public DateTime? DeletionTime { get; set; }
    }
}

