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

namespace IWS5.DatabaseAccess.IwsDataModels;

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

    public int TemplateId { get; set; }

    [Column("DBTableName")]
    [StringLength(255)]
    public string DbtableName { get; set; } = null!;

    public int SourceTypeId { get; set; }

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

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

    [Column("DBDataType")]
    [StringLength(50)]
    public string DbdataType { get; set; } = null!;

    [ForeignKey("SourceTypeId")]
    [InverseProperty("AtexternalTrackingDefinitions")]
    public virtual AtexternalTrackingSourceType SourceType { get; set; } = null!;

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