Table of Contents

Class TeamMemberBase

Namespace
Tharga.Team.MongoDB
Assembly
Tharga.Team.MongoDB.dll
public abstract record TeamMemberBase : ITeamMember, IEquatable<TeamMemberBase>
Inheritance
TeamMemberBase
Implements
Derived
Inherited Members

Properties

AccessLevel

[BsonRepresentation(BsonType.String)]
public AccessLevel AccessLevel { get; init; }

Property Value

AccessLevel

Invitation

public Invitation Invitation { get; init; }

Property Value

Invitation

Key

public string Key { get; set; }

Property Value

string

LastSeen

public DateTime? LastSeen { get; init; }

Property Value

DateTime?

Name

public string Name { get; init; }

Property Value

string

ScopeOverrides

[BsonIgnoreIfNull]
public string[] ScopeOverrides { get; init; }

Property Value

string[]

State

[BsonRepresentation(BsonType.String)]
public MembershipState? State { get; init; }

Property Value

MembershipState?

SuspendedAt

When this member's access to the team was suspended, or null if it is active. A suspended member keeps their membership, access level, roles and history, and still sees the team in the selector — they are granted no team scopes, so every scoped operation refuses.

[BsonIgnoreIfNull]
public DateTime? SuspendedAt { get; init; }

Property Value

DateTime?

Remarks

Opt-in by shape, like DisabledAt: declare the property on the member entity to persist it, and override TeamServiceBase.SetTeamMemberSuspendedAsync.

Deliberately not a fourth MembershipState. Host stores list a user's teams by filtering State == MembershipState.Member, so a suspended state would remove the team from the selector entirely — the opposite of the intent, and unfixable from inside the toolkit because that filter lives in host code. Keeping State at Member means every existing query keeps working untouched.

SuspendedBy

Who suspended this member, or null.

[BsonIgnoreIfNull]
public string SuspendedBy { get; init; }

Property Value

string

TenantRoles

[BsonIgnoreIfNull]
public string[] TenantRoles { get; init; }

Property Value

string[]