using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATButton")]
[Index("ObjectId", Name = "UK_ATButton", IsUnique = true)]
[Index("ButtonName", "QueueId", Name = "UK_Name_Queue", IsUnique = true)]
public partial class Atbutton
{
    [Key]
    public int Id { get; set; }

    [StringLength(255)]
    public string ButtonName { get; set; } = null!;

    [StringLength(255)]
    public string? ButtonValue { get; set; }

    public int ButtonIndex { get; set; }

    public int QueueId { get; set; }

    [StringLength(255)]
    public string? HelpText { get; set; }

    [StringLength(255)]
    public string? Tag { get; set; }

    public Guid ObjectId { get; set; }

    public int EventId { get; set; }

    [InverseProperty("LastAction")]
    public virtual ICollection<AttrackingRecord> AttrackingRecords { get; set; } = new List<AttrackingRecord>();

    [ForeignKey("EventId")]
    [InverseProperty("Atbuttons")]
    public virtual AteventDefinition Event { get; set; } = null!;

    [ForeignKey("QueueId")]
    [InverseProperty("Atbuttons")]
    public virtual Atqueue Queue { get; set; } = null!;
}
