32 lines
797 B
C#
32 lines
797 B
C#
using Tiku.Application.Growth;
|
|
using Tiku.Application.Security;
|
|
using Tiku.Infrastructure.Persistence;
|
|
|
|
namespace Tiku.Infrastructure.Growth;
|
|
|
|
public sealed partial class ReferralService(
|
|
TikuDbContext dbContext,
|
|
IReferralQrcodeGenerator qrcodeGenerator,
|
|
ICurrentAccessContext currentAccessContext) : IReferralService
|
|
{
|
|
private static readonly HashSet<string> AllowedEventTypes = new(StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
"enter",
|
|
"register",
|
|
"purchase",
|
|
"share",
|
|
"scan",
|
|
"manual_bind"
|
|
};
|
|
|
|
private static readonly HashSet<string> AllowedSources = new(StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
"share",
|
|
"qrcode",
|
|
"timeline",
|
|
"miniapp",
|
|
"h5",
|
|
"manual",
|
|
"unknown"
|
|
};
|
|
} |