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;

[Table("DeletableTreeValues", Schema = "DeletableTree")]
public class DeletableTreeValue : IId
{
    [Key]
    public long Id { get; set; }

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

    public long? ParentId { get; set; }

    [AuditName]
    [Required, MaxLength(50)]
    public string Name { get; set; } = null!;

    [Required, MaxLength(50)]
    public string Test { get; set; } = string.Empty;

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