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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATEventTriggerDefinition")]
public partial class AteventTriggerDefinition
{
    [Key]
    public int Id { get; set; }

    public int ProcessId { get; set; }

    public int TemplateId { get; set; }

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

    public int HookId { get; set; }

    public int ActionId { get; set; }

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

    public string TriggerAction { get; set; } = null!;

    [ForeignKey("ActionId")]
    [InverseProperty("AteventTriggerDefinitions")]
    public virtual AttriggerAction Action { get; set; } = null!;

    [ForeignKey("HookId")]
    [InverseProperty("AteventTriggerDefinitions")]
    public virtual AttriggerHook Hook { get; set; } = null!;

    [ForeignKey("ProcessId")]
    [InverseProperty("AteventTriggerDefinitions")]
    public virtual AtprocessDefinition Process { get; set; } = null!;

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