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("ParentValues", Schema = "ParentChild")]
public class ParentValue : IId
{
    [Key]
    public long Id { get; set; }
    
    public long? GrandParentId { get; set; }

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

    [AuditParent]
    [ForeignKey(nameof(GrandParentId))]
    public GrandParentValue GrandParentValue { get; set; } = null!;
}