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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATSplit")]
[Index("SourceWorkItemRef", Name = "IX_ATSplit")]
public partial class Atsplit
{
    [Key]
    public int SplitWorkItemRef { get; set; }

    public int SourceWorkItemRef { get; set; }

    public int? JoinEventId { get; set; }

    public int? Flag { get; set; }

    [ForeignKey("JoinEventId")]
    [InverseProperty("Atsplits")]
    public virtual AteventDefinition? JoinEvent { get; set; }

    [ForeignKey("SourceWorkItemRef")]
    [InverseProperty("AtsplitSourceWorkItemRefNavigations")]
    public virtual AtworkItemReference SourceWorkItemRefNavigation { get; set; } = null!;

    [ForeignKey("SplitWorkItemRef")]
    [InverseProperty("AtsplitSplitWorkItemRefNavigation")]
    public virtual AtworkItemReference SplitWorkItemRefNavigation { get; set; } = null!;
}
