using FlatRender.IdentitySvc.Domain.Enums; namespace FlatRender.IdentitySvc.Domain.Entities; public class Quest { public Guid Id { get; set; } = Guid.NewGuid(); public Guid? TenantId { get; set; } public string Title { get; set; } = default!; public string? Challenge { get; set; } public string? Why { get; set; } public string? Hint { get; set; } public string? Aphorism { get; set; } public string? Icon { get; set; } public QuestType QuestType { get; set; } public string TargetEvent { get; set; } = default!; public int TargetCount { get; set; } = 1; public string Metadata { get; set; } = "{}"; public PrizeType PrizeType { get; set; } public long PrizeAmount { get; set; } public int? LevelLimit { get; set; } public string? StartUrl { get; set; } public string? PostActionName { get; set; } public int OrderValue { get; set; } public DateTime? StartsAt { get; set; } public DateTime? ExpiresAt { get; set; } public bool IsActive { get; set; } = true; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; public ICollection Progress { get; set; } = []; } public class UserQuestProgress { public Guid Id { get; set; } = Guid.NewGuid(); public Guid UserId { get; set; } public Guid QuestId { get; set; } public Quest Quest { get; set; } = default!; public int CurrentCount { get; set; } public string? TextValue { get; set; } public bool IsCompleted { get; set; } public DateTime? CompletedAt { get; set; } public bool PrizeClaimed { get; set; } public DateTime? PrizeClaimedAt { get; set; } public DateOnly? PeriodStart { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; } public class Gift { public Guid Id { get; set; } = Guid.NewGuid(); public Guid? TenantId { get; set; } public string Name { get; set; } = default!; public string? Description { get; set; } public string? Icon { get; set; } public GiftType GiftType { get; set; } public PrizeType PrizeType { get; set; } public long Value { get; set; } public string? Unit { get; set; } public Guid? AssignedByUserId { get; set; } public bool IsActive { get; set; } = true; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public ICollection EarnedGifts { get; set; } = []; } public class EarnedGift { public Guid Id { get; set; } = Guid.NewGuid(); public Guid UserId { get; set; } public Guid GiftId { get; set; } public Gift Gift { get; set; } = default!; public Guid? NotificationId { get; set; } public string? Source { get; set; } public Guid? SourceRef { get; set; } public DateTime EarnedAt { get; set; } = DateTime.UtcNow; public DateTime? ExpiresAt { get; set; } public bool IsUsed { get; set; } public DateTime? UsedAt { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; } public class Avatar { public Guid Id { get; set; } = Guid.NewGuid(); public string Code { get; set; } = default!; public string Url { get; set; } = default!; public string? Description { get; set; } public int Sort { get; set; } public bool IsActive { get; set; } = true; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; }