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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATEventTriggerTemplate")]
[Index("EventId", "TemplateId", "Order", Name = "UK_ATEventTriggerTemplate_EventId_TemplateId_Order", IsUnique = true)]
public partial class AteventTriggerTemplate
{
    [Key]
    public int Id { get; set; }

    public int EventId { get; set; }

    public int TemplateId { get; set; }

    public int Order { get; set; }

    public bool Enabled { get; set; }

    [StringLength(500)]
    public string Description { get; set; } = null!;

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

    [ForeignKey("TemplateId")]
    [InverseProperty("AteventTriggerTemplates")]
    public virtual Attemplate Template { get; set; } = null!;
}
