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

namespace IWS5.DatabaseAccess.IwsDataModels;

[Table("ATNote")]
[Index("WorkItemId", Name = "ATNote_WorkitemId")]
public partial class Atnote
{
    [Key]
    public int NoteId { get; set; }

    public int WorkItemId { get; set; }

    public int? DocumentId { get; set; }

    [StringLength(50)]
    public string Submitter { get; set; } = null!;

    [Column(TypeName = "datetime")]
    public DateTime SubmitDate { get; set; }

    [StringLength(1024)]
    public string Note { get; set; } = null!;

    [ForeignKey("DocumentId")]
    [InverseProperty("Atnotes")]
    public virtual Atdocument? Document { get; set; }

    [ForeignKey("WorkItemId")]
    [InverseProperty("Atnotes")]
    public virtual AtworkItem WorkItem { get; set; } = null!;
}
