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("SimpleTreeValues", Schema = "SimpleTree")]
public class SimpleTreeValue : IId
{
    [Key]
    public long Id { get; set; }

    public long? ParentId { get; set; }

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

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