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

namespace IWS5.DatabaseAccess.IwsDataModels;

[PrimaryKey("ProcessObjectId", "AllowRights", "DocumentTemplateObjectid")]
[Table("ATProcessDocumentTemplateRight")]
[Index("ProcessObjectId", Name = "IX_ATProcessDocumentTemplateRights_ProcessObjectId")]
public partial class AtprocessDocumentTemplateRight
{
    [Key]
    public Guid ProcessObjectId { get; set; }

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

    [Key]
    public Guid DocumentTemplateObjectid { get; set; }

    [ForeignKey("AllowRights")]
    [InverseProperty("AtprocessDocumentTemplateRights")]
    public virtual AtrightAllowRight AllowRightsNavigation { get; set; } = null!;

    [ForeignKey("DocumentTemplateObjectid")]
    [InverseProperty("AtprocessDocumentTemplateRights")]
    public virtual AtdocumentCabinet DocumentTemplateObject { get; set; } = null!;

    [ForeignKey("ProcessObjectId")]
    [InverseProperty("AtprocessDocumentTemplateRights")]
    public virtual AtprocessDefinition ProcessObject { get; set; } = null!;
}
