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

namespace IWS5.DatabaseAccess.IwsDataModels;

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

    public int ProcessId { get; set; }

    public int EventId { get; set; }

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

    [StringLength(1)]
    public string Enable { get; set; } = null!;

    public bool EnableExternal { get; set; }

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

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

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

    public string? Message { get; set; }

    [InverseProperty("TrackingDefinition")]
    public virtual ICollection<AttrackingDefinitionTemplate> AttrackingDefinitionTemplates { get; set; } = new List<AttrackingDefinitionTemplate>();

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

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

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