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

    [Required] public long LinkId { get; set; }

    [AuditName]
    [NotMapped]
    public string Name => $"{GrandParentValue.Name} testing";

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

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