namespace Modules.User.Database.Database.Entities;

public class AccountPermission
{
    public long Id { get; set; }

    public Guid AccountId { get; set; }
    public Account Account { get; set; } = null!;
    public int PermissionId { get; set; }
    public Permission Permission { get; set; } = null!;
    public Guid IssuerId { get; set; }
    public Account Issuer { get; set; } = null!;
    public DateTime GrantedAtUtc { get; set; }
    public string? GrantReason { get; set; }
    
    public DateTime? RevokedAtUtc { get; set; }
    public Guid? RevokerId { get; set; }
    public Account? Revoker { get; set; }
    public string? RevokeReason { get; set; }

    public uint Xmin { get; private set; }
}