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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATInboxEvent")]
[Index("EventId", Name = "IX_ATInboxEvent_EventID")]
[Index("InboxId", Name = "IX_ATInboxEvent_Inbox")]
public partial class AtinboxEvent
{
    [Key]
    public int Id { get; set; }

    [StringLength(32)]
    public string? InboxAssignment { get; set; }

    [Column("EventID")]
    public int EventId { get; set; }

    public int? InboxId { get; set; }

    public int AssignmentTypeId { get; set; }

    [ForeignKey("AssignmentTypeId")]
    [InverseProperty("AtinboxEvents")]
    public virtual AtassigmentType AssignmentType { get; set; } = null!;

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

    [ForeignKey("InboxId")]
    [InverseProperty("AtinboxEvents")]
    public virtual Atqueue? Inbox { get; set; }
}
