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

namespace IWS5.DatabaseAccess.IwsDataModels;

[PrimaryKey("UserGuid", "ObjectType", "AllowRights", "ObjectGuid")]
[Table("ATRight")]
[Index("ObjectType", "ObjectGuid", "UserGuid", Name = "ATRight_Composite1")]
[Index("AllowRights", "UserGuid", "ObjectGuid", Name = "ATRight_Composite2")]
[Index("UserGuid", Name = "ATRight_UserGuid")]
public partial class Atright
{
    [Key]
    public Guid UserGuid { get; set; }

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

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

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

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

    [ForeignKey("ObjectType")]
    [InverseProperty("Atrights")]
    public virtual AtrightObjectType ObjectTypeNavigation { get; set; } = null!;

    [ForeignKey("UserGuid")]
    [InverseProperty("Atrights")]
    public virtual Atuser User { get; set; } = null!;
}
