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

namespace IWS5.DatabaseAccess.IwsDataModels;

[PrimaryKey("TrackingDefinitionId", "TemplateId")]
[Table("ATTrackingDefinitionTemplates")]
public partial class AttrackingDefinitionTemplate
{
    [Key]
    public int TrackingDefinitionId { get; set; }

    [Key]
    public int TemplateId { get; set; }

    public int Order { get; set; }

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

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

    [ForeignKey("TrackingDefinitionId")]
    [InverseProperty("AttrackingDefinitionTemplates")]
    public virtual AttrackingDefinition TrackingDefinition { get; set; } = null!;
}
