namespace FozFc.Api.Domain;
///
/// Known MongoDB collections (formerly Firestore) and their access policies.
///
public static class Collections
{
public const string Users = "users";
public const string UserRoles = "user_roles";
public const string Members = "members";
public const string Orders = "orders";
public const string ContactMessages = "contact_messages";
public static readonly IReadOnlySet All = new HashSet
{
"news", "matches", "players", "products", "club_profile", "membership_page",
"contact_messages", "categories", "members", "sponsors", "gallery",
"standings", "tickets", "orders", "qrCodeScans", "user_roles", "users",
};
/// Collections that anyone may read (public site content).
public static readonly IReadOnlySet PublicRead = new HashSet
{
"news", "matches", "players", "products", "club_profile", "membership_page",
"categories", "sponsors", "gallery", "standings", "tickets",
};
/// Collections that accept anonymous writes (public form submissions).
public static readonly IReadOnlySet PublicWrite = new HashSet
{
"contact_messages",
};
/// Collections restricted to admins for both reads and writes.
public static readonly IReadOnlySet AdminOnly = new HashSet
{
"users", "user_roles",
};
public static bool IsKnown(string name) => All.Contains(name);
}