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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATTaskDefinition")]
[Index("EventId", "TaskName", Name = "IX_ATTaskDefinition", IsUnique = true)]
[Index("EventId", "TaskIndex", Name = "IX_ATTaskDefinition_1", IsUnique = true)]
public partial class AttaskDefinition
{
    [Key]
    [Column("TaskID")]
    public int TaskId { get; set; }

    [Column("EventID")]
    public int EventId { get; set; }

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

    public int Required { get; set; }

    public int TaskIndex { get; set; }

    [InverseProperty("Task")]
    public virtual ICollection<AttaskInstance> AttaskInstances { get; set; } = new List<AttaskInstance>();

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