using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using e_suite.Database.Audit.Attributes;
using e_suite.Database.Audit.Models;

namespace e_suite.Database.Audit.UnitTests.Helpers.Tables;

public class ChildTableWithLastUpdated : IId
{
    [Key]
    public long Id { get; set; }

    public string Name { get; set; } = string.Empty;

    [AuditSoftDelete(true)]
    public bool Deleted { get; set; } = false;

    public long? ParentId { get; set; }
    
    [AuditLastUpdated]
    public DateTimeOffset LastUpdated { get; set; }

    [AuditParent]
    [ForeignKey(nameof(ParentId))]
    public TableWithLastUpdated Parent { get; set; } = null!;


}