namespace LctMonolith.Domain.Entities; /// Artifact definition (unique reward objects). public class Artifact { public Guid Id { get; set; } = Guid.NewGuid(); public string Name { get; set; } = null!; public string? Description { get; set; } public string? ImageUrl { get; set; } public ArtifactRarity Rarity { get; set; } public ICollection Users { get; set; } = new List(); public ICollection MissionRewards { get; set; } = new List(); } /// Mapping artifact to user ownership. public class UserArtifact { public Guid UserId { get; set; } public AppUser User { get; set; } = null!; public Guid ArtifactId { get; set; } public Artifact Artifact { get; set; } = null!; public DateTime ObtainedAt { get; set; } = DateTime.UtcNow; } /// Reward mapping: mission grants artifact(s). public class MissionArtifactReward { public Guid MissionId { get; set; } public Mission Mission { get; set; } = null!; public Guid ArtifactId { get; set; } public Artifact Artifact { get; set; } = null!; } /// Item in store that can be purchased with mana. public class StoreItem { public Guid Id { get; set; } = Guid.NewGuid(); public string Name { get; set; } = null!; public string? Description { get; set; } public int Price { get; set; } public bool IsActive { get; set; } = true; public int? Stock { get; set; } public ICollection UserInventory { get; set; } = new List(); } /// User owned store item record. public class UserInventoryItem { public Guid UserId { get; set; } public AppUser User { get; set; } = null!; public Guid StoreItemId { get; set; } public StoreItem StoreItem { get; set; } = null!; public int Quantity { get; set; } = 1; public DateTime AcquiredAt { get; set; } = DateTime.UtcNow; public bool IsReturned { get; set; } } /// Transaction record for purchases/returns/sales. public class Transaction { public Guid Id { get; set; } = Guid.NewGuid(); public Guid UserId { get; set; } public AppUser User { get; set; } = null!; public TransactionType Type { get; set; } public Guid? StoreItemId { get; set; } public StoreItem? StoreItem { get; set; } public int ManaAmount { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; } /// System event log for auditing user actions and progression. public class EventLog { public Guid Id { get; set; } = Guid.NewGuid(); public EventType Type { get; set; } public Guid UserId { get; set; } public AppUser User { get; set; } = null!; public string? Data { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; } /// Refresh token for JWT auth. public class RefreshToken { public Guid Id { get; set; } = Guid.NewGuid(); public string Token { get; set; } = null!; public DateTime ExpiresAt { get; set; } public bool IsRevoked { get; set; } public Guid UserId { get; set; } public AppUser User { get; set; } = null!; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; }