using System.ComponentModel;
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.Core.Tables.CustomFields;

[DisplayName("Custom Field Sequence")]
[Table("CustomFieldSequences", Schema = "CustomFields")]
public class CustomFieldSequence : IId
{
    [Key]
    public long Id { get; set; }

    public long CustomFieldId { get; set; }

    public long SequenceId { get; set; }

    [AuditLastUpdated]
    public DateTimeOffset LastUpdated { get; set; }

    [AuditParent]
    [ForeignKey(nameof(CustomFieldId))]
    public virtual CustomField CustomField { get; set; } = null!;

    [ForeignKey(nameof(SequenceId))]
    public virtual Sequences.Sequence Sequence { get; set; } = null!;
}