refactor: shoved in what i wanted to shove
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.Security.Claims;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Security.Claims;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Diagnostics;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EventLog = LctMonolith.Models.EventLog;
|
||||
using EventLog = LctMonolith.Models.Database.EventLog;
|
||||
|
||||
namespace LctMonolith.Database.Data;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Serilog;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public enum EventType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using LctMonolith.Database.Repositories;
|
||||
using LctMonolith.Models;
|
||||
using EventLog = LctMonolith.Models.EventLog;
|
||||
using LctMonolith.Models.Database;
|
||||
using EventLog = LctMonolith.Models.Database.EventLog;
|
||||
|
||||
namespace LctMonolith.Database.UnitOfWork;
|
||||
|
||||
@@ -12,16 +11,13 @@ public interface IUnitOfWork
|
||||
{
|
||||
IGenericRepository<AppUser> Users { get; }
|
||||
IGenericRepository<Rank> Ranks { get; }
|
||||
IGenericRepository<RankRequiredMission> RankRequiredMissions { get; }
|
||||
IGenericRepository<RankRequiredCompetency> RankRequiredCompetencies { get; }
|
||||
IGenericRepository<RankMissionRule> RankMissionRules { get; }
|
||||
IGenericRepository<RankSkillRule> RankSkillRules { get; }
|
||||
IGenericRepository<Mission> Missions { get; }
|
||||
IGenericRepository<UserMission> UserMissions { get; }
|
||||
IGenericRepository<MissionCompetencyReward> MissionCompetencyRewards { get; }
|
||||
IGenericRepository<MissionArtifactReward> MissionArtifactRewards { get; }
|
||||
IGenericRepository<Competency> Competencies { get; }
|
||||
IGenericRepository<UserCompetency> UserCompetencies { get; }
|
||||
IGenericRepository<Artifact> Artifacts { get; }
|
||||
IGenericRepository<UserArtifact> UserArtifacts { get; }
|
||||
IGenericRepository<PlayerMission> PlayerMissions { get; }
|
||||
IGenericRepository<MissionSkillReward> MissionSkillRewards { get; }
|
||||
IGenericRepository<Skill> Skills { get; }
|
||||
IGenericRepository<PlayerSkill> PlayerSkills { get; }
|
||||
IGenericRepository<StoreItem> StoreItems { get; }
|
||||
IGenericRepository<UserInventoryItem> UserInventoryItems { get; }
|
||||
IGenericRepository<Transaction> Transactions { get; }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
using LctMonolith.Database.Data;
|
||||
using LctMonolith.Database.Repositories;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using EventLog = LctMonolith.Models.EventLog;
|
||||
using EventLog = LctMonolith.Models.Database.EventLog;
|
||||
|
||||
namespace LctMonolith.Database.UnitOfWork;
|
||||
|
||||
@@ -22,16 +22,13 @@ public class UnitOfWork : IUnitOfWork, IAsyncDisposable
|
||||
|
||||
private IGenericRepository<AppUser>? _users;
|
||||
private IGenericRepository<Rank>? _ranks;
|
||||
private IGenericRepository<RankRequiredMission>? _rankRequiredMissions;
|
||||
private IGenericRepository<RankRequiredCompetency>? _rankRequiredCompetencies;
|
||||
private IGenericRepository<RankMissionRule>? _rankMissionRules;
|
||||
private IGenericRepository<RankSkillRule>? _rankSkillRules;
|
||||
private IGenericRepository<Mission>? _missions;
|
||||
private IGenericRepository<UserMission>? _userMissions;
|
||||
private IGenericRepository<MissionCompetencyReward>? _missionCompetencyRewards;
|
||||
private IGenericRepository<MissionArtifactReward>? _missionArtifactRewards;
|
||||
private IGenericRepository<Competency>? _competencies;
|
||||
private IGenericRepository<UserCompetency>? _userCompetencies;
|
||||
private IGenericRepository<Artifact>? _artifacts;
|
||||
private IGenericRepository<UserArtifact>? _userArtifacts;
|
||||
private IGenericRepository<PlayerMission>? _playerMissions;
|
||||
private IGenericRepository<MissionSkillReward>? _missionSkillRewards;
|
||||
private IGenericRepository<Skill>? _skills;
|
||||
private IGenericRepository<PlayerSkill>? _playerSkills;
|
||||
private IGenericRepository<StoreItem>? _storeItems;
|
||||
private IGenericRepository<UserInventoryItem>? _userInventoryItems;
|
||||
private IGenericRepository<Transaction>? _transactions;
|
||||
@@ -41,16 +38,13 @@ public class UnitOfWork : IUnitOfWork, IAsyncDisposable
|
||||
|
||||
public IGenericRepository<AppUser> Users => _users ??= new GenericRepository<AppUser>(_ctx);
|
||||
public IGenericRepository<Rank> Ranks => _ranks ??= new GenericRepository<Rank>(_ctx);
|
||||
public IGenericRepository<RankRequiredMission> RankRequiredMissions => _rankRequiredMissions ??= new GenericRepository<RankRequiredMission>(_ctx);
|
||||
public IGenericRepository<RankRequiredCompetency> RankRequiredCompetencies => _rankRequiredCompetencies ??= new GenericRepository<RankRequiredCompetency>(_ctx);
|
||||
public IGenericRepository<RankMissionRule> RankMissionRules => _rankMissionRules ??= new GenericRepository<RankMissionRule>(_ctx);
|
||||
public IGenericRepository<RankSkillRule> RankSkillRules => _rankSkillRules ??= new GenericRepository<RankSkillRule>(_ctx);
|
||||
public IGenericRepository<Mission> Missions => _missions ??= new GenericRepository<Mission>(_ctx);
|
||||
public IGenericRepository<UserMission> UserMissions => _userMissions ??= new GenericRepository<UserMission>(_ctx);
|
||||
public IGenericRepository<MissionCompetencyReward> MissionCompetencyRewards => _missionCompetencyRewards ??= new GenericRepository<MissionCompetencyReward>(_ctx);
|
||||
public IGenericRepository<MissionArtifactReward> MissionArtifactRewards => _missionArtifactRewards ??= new GenericRepository<MissionArtifactReward>(_ctx);
|
||||
public IGenericRepository<Competency> Competencies => _competencies ??= new GenericRepository<Competency>(_ctx);
|
||||
public IGenericRepository<UserCompetency> UserCompetencies => _userCompetencies ??= new GenericRepository<UserCompetency>(_ctx);
|
||||
public IGenericRepository<Artifact> Artifacts => _artifacts ??= new GenericRepository<Artifact>(_ctx);
|
||||
public IGenericRepository<UserArtifact> UserArtifacts => _userArtifacts ??= new GenericRepository<UserArtifact>(_ctx);
|
||||
public IGenericRepository<PlayerMission> PlayerMissions => _playerMissions ??= new GenericRepository<PlayerMission>(_ctx);
|
||||
public IGenericRepository<MissionSkillReward> MissionSkillRewards => _missionSkillRewards ??= new GenericRepository<MissionSkillReward>(_ctx);
|
||||
public IGenericRepository<Skill> Skills => _skills ??= new GenericRepository<Skill>(_ctx);
|
||||
public IGenericRepository<PlayerSkill> PlayerSkills => _playerSkills ??= new GenericRepository<PlayerSkill>(_ctx);
|
||||
public IGenericRepository<StoreItem> StoreItems => _storeItems ??= new GenericRepository<StoreItem>(_ctx);
|
||||
public IGenericRepository<UserInventoryItem> UserInventoryItems => _userInventoryItems ??= new GenericRepository<UserInventoryItem>(_ctx);
|
||||
public IGenericRepository<Transaction> Transactions => _transactions ??= new GenericRepository<Transaction>(_ctx);
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
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<UserArtifact> Users { get; set; } = new List<UserArtifact>();
|
||||
public ICollection<MissionArtifactReward> MissionRewards { get; set; } = new List<MissionArtifactReward>();
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public enum ArtifactRarity { Common = 0, Rare = 1, Epic = 2, Legendary = 3 }
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class Competency
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public ICollection<UserCompetency> UserCompetencies { get; set; } = new List<UserCompetency>();
|
||||
public ICollection<MissionCompetencyReward> MissionRewards { get; set; } = new List<MissionCompetencyReward>();
|
||||
public ICollection<RankRequiredCompetency> RankRequirements { get; set; } = new List<RankRequiredCompetency>();
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class AppUser : IdentityUser<Guid>
|
||||
{
|
||||
9
LctMonolith/Models/Database/AuditableEntity.cs
Normal file
9
LctMonolith/Models/Database/AuditableEntity.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class AuditableEntity
|
||||
{
|
||||
public DateTimeOffset CreatedOn { get; set; }
|
||||
public string CreatedBy { get; set; } = string.Empty;
|
||||
public DateTimeOffset UpdatedOn { get; set; }
|
||||
public string UpdatedBy { get; set; } = string.Empty;
|
||||
}
|
||||
16
LctMonolith/Models/Database/Dialogue.cs
Normal file
16
LctMonolith/Models/Database/Dialogue.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Dialogue
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid MissionId { get; set; }
|
||||
public required Mission Mission { get; set; }
|
||||
|
||||
public Guid InitialDialogueMessageId { get; set; }
|
||||
public Dialogue? InitialDialogueMessage { get; set; }
|
||||
public Guid InterimDialogueMessageId { get; set; }
|
||||
public Dialogue? InterimDialogueMessage { get; set; }
|
||||
public Guid EndDialogueMessageId { get; set; }
|
||||
public Dialogue? EndDialogueMessage { get; set; }
|
||||
}
|
||||
27
LctMonolith/Models/Database/DialogueMessage.cs
Normal file
27
LctMonolith/Models/Database/DialogueMessage.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using LctMonolith.Models.Enums;
|
||||
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class DialogueMessage
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Character CharacterLeft { get; set; } = Character.None;
|
||||
public Character CharacterRight { get; set; } = Character.None;
|
||||
public CharacterAnimation CharacterLeftAnim { get; set; } = CharacterAnimation.Neutral;
|
||||
public CharacterAnimation CharacterRightAnim { get; set; } = CharacterAnimation.Neutral;
|
||||
public string CharacterLeftMessage { get; set; } = string.Empty;
|
||||
public string CharacterRightMessage { get; set; } = string.Empty;
|
||||
public MessageStyle CharacterLeftMessageStyle { get; set; } = MessageStyle.Normal;
|
||||
public MessageStyle CharacterRightMessageStyle { get; set; } = MessageStyle.Normal;
|
||||
public bool AllowMessageAi { get; set; }
|
||||
public string MessageAiButtonText { get; set; } = string.Empty;
|
||||
|
||||
public Guid InitialDialogueId { get; set; }
|
||||
public Dialogue? InitialDialogue { get; set; }
|
||||
public Guid InterimDialogueId { get; set; }
|
||||
public Dialogue? InterimDialogue { get; set; }
|
||||
public Guid EndDialogueId { get; set; }
|
||||
public Dialogue? EndDialogue { get; set; }
|
||||
|
||||
public ICollection<DialogueMessageResponseOption> DialogueMessageResponseOptions = new List<DialogueMessageResponseOption>();
|
||||
}
|
||||
16
LctMonolith/Models/Database/DialogueMessageResponseOption.cs
Normal file
16
LctMonolith/Models/Database/DialogueMessageResponseOption.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using LctMonolith.Models.Enums;
|
||||
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class DialogueMessageResponseOption
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Message { get; set; } = "...";
|
||||
public MessageStyle MessageStyle { get; set; } = MessageStyle.Normal;
|
||||
public int z { get; set; }
|
||||
|
||||
public Guid ParentDialogueMessageId { get; set; }
|
||||
public required DialogueMessage ParentDialogueMessage { get; set; }
|
||||
public Guid DestinationDialogueMessageId { get; set; }
|
||||
public DialogueMessage? DestinationDialogueMessage { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class EventLog
|
||||
{
|
||||
24
LctMonolith/Models/Database/Mission.cs
Normal file
24
LctMonolith/Models/Database/Mission.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Mission
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public MissionCategory? MissionCategory { get; set; }
|
||||
public long MissionCategoryId { get; set; }
|
||||
public Mission? ParentMission { get; set; }
|
||||
public long ParentMissionId { get; set; }
|
||||
public int ExpReward { get; set; }
|
||||
public int ManaReward { get; set; }
|
||||
|
||||
public Guid DialogueId { get; set; }
|
||||
public Dialogue? Dialogue { get; set; }
|
||||
|
||||
public ICollection<Mission> ChildMissions { get; set; } = new List<Mission>();
|
||||
public ICollection<PlayerMission> PlayerMissions { get; set; } = new List<PlayerMission>();
|
||||
public ICollection<MissionItemReward> MissionItemRewards { get; set; } = new List<MissionItemReward>();
|
||||
public ICollection<MissionSkillReward> MissionSkillRewards { get; set; } = new List<MissionSkillReward>();
|
||||
public ICollection<MissionRankRule> MissionRankRules { get; set; } = new List<MissionRankRule>();
|
||||
public ICollection<RankMissionRule> RankMissionRules { get; set; } = new List<RankMissionRule>();
|
||||
}
|
||||
9
LctMonolith/Models/Database/MissionCategory.cs
Normal file
9
LctMonolith/Models/Database/MissionCategory.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class MissionCategory
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public ICollection<Mission> Missions { get; set; } = new List<Mission>();
|
||||
}
|
||||
9
LctMonolith/Models/Database/MissionItemReward.cs
Normal file
9
LctMonolith/Models/Database/MissionItemReward.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class MissionItemReward
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ItemId { get; set; }
|
||||
public Guid MissionId { get; set; }
|
||||
public required Mission Mission { get; set; }
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class RankRequiredMission
|
||||
public class MissionRankRule
|
||||
{
|
||||
public Guid RankId { get; set; }
|
||||
public Rank Rank { get; set; } = null!;
|
||||
public Guid Id { get; set; }
|
||||
public Guid MissionId { get; set; }
|
||||
public Mission Mission { get; set; } = null!;
|
||||
public Guid RankId { get; set; }
|
||||
public Rank Rank { get; set; } = null!;
|
||||
}
|
||||
11
LctMonolith/Models/Database/MissionSkillReward.cs
Normal file
11
LctMonolith/Models/Database/MissionSkillReward.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class MissionSkillReward
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MissionId { get; set; }
|
||||
public Mission Mission { get; set; } = null!;
|
||||
public long SkillId { get; set; }
|
||||
public Skill Skill { get; set; } = null!;
|
||||
public int Value { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Notification
|
||||
{
|
||||
13
LctMonolith/Models/Database/Player.cs
Normal file
13
LctMonolith/Models/Database/Player.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Player
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Rank? Rank { get; set; }
|
||||
public Guid RankId {get; set; }
|
||||
public int Experience { get; set; }
|
||||
|
||||
public ICollection<PlayerMission> PlayerMissions { get; set; } = new List<PlayerMission>();
|
||||
public ICollection<PlayerSkill> PlayerSkills { get; set; } = new List<PlayerSkill>();
|
||||
}
|
||||
13
LctMonolith/Models/Database/PlayerMission.cs
Normal file
13
LctMonolith/Models/Database/PlayerMission.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class PlayerMission
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid PlayerId { get; set; }
|
||||
public required Player Player { get; set; }
|
||||
public Guid MissionId { get; set; }
|
||||
public required Mission Mission { get; set; }
|
||||
public DateTime? Started { get; set; }
|
||||
public DateTime? Completed { get; set; }
|
||||
public DateTime? RewardsRedeemed { get; set; }
|
||||
}
|
||||
11
LctMonolith/Models/Database/PlayerSkill.cs
Normal file
11
LctMonolith/Models/Database/PlayerSkill.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class PlayerSkill
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid PlayerId { get; set; }
|
||||
public Player Player { get; set; } = null!;
|
||||
public Guid SkillId { get; set; }
|
||||
public Skill Skill { get; set; } = null!;
|
||||
public int Score { get; set; }
|
||||
}
|
||||
13
LctMonolith/Models/Database/Rank.cs
Normal file
13
LctMonolith/Models/Database/Rank.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Rank
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public int ExpNeeded { get; set; }
|
||||
|
||||
public ICollection<Player> Players { get; set; } = new List<Player>();
|
||||
public ICollection<MissionRankRule> MissionRankRules { get; set; } = new List<MissionRankRule>();
|
||||
public ICollection<RankMissionRule> RankMissionRules { get; set; } = new List<RankMissionRule>();
|
||||
public ICollection<RankSkillRule> RankSkillRules { get; set; } = new List<RankSkillRule>();
|
||||
}
|
||||
10
LctMonolith/Models/Database/RankMissionRule.cs
Normal file
10
LctMonolith/Models/Database/RankMissionRule.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class RankMissionRule
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid RankId { get; set; }
|
||||
public Rank Rank { get; set; } = null!;
|
||||
public Guid MissionId { get; set; }
|
||||
public Mission Mission { get; set; } = null!;
|
||||
}
|
||||
11
LctMonolith/Models/Database/RankSkillRule.cs
Normal file
11
LctMonolith/Models/Database/RankSkillRule.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class RankSkillRule
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid RankId { get; set; }
|
||||
public Rank Rank { get; set; } = null!;
|
||||
public Guid SkillId { get; set; }
|
||||
public Skill Skill { get; set; } = null!;
|
||||
public int Min { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class RefreshToken
|
||||
{
|
||||
10
LctMonolith/Models/Database/Skill.cs
Normal file
10
LctMonolith/Models/Database/Skill.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Skill
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public ICollection<MissionSkillReward> MissionSkillRewards { get; set; } = new List<MissionSkillReward>();
|
||||
public ICollection<RankSkillRule> RankSkillRules { get; set; } = new List<RankSkillRule>();
|
||||
public ICollection<PlayerSkill> PlayerSkills { get; set; } = new List<PlayerSkill>();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class StoreItem
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class Transaction
|
||||
{
|
||||
@@ -1,3 +1,3 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public enum TransactionType { Purchase = 0, Return = 1, Sale = 2 }
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace LctMonolith.Models;
|
||||
namespace LctMonolith.Models.Database;
|
||||
|
||||
public class UserInventoryItem
|
||||
{
|
||||
11
LctMonolith/Models/Enums/Character.cs
Normal file
11
LctMonolith/Models/Enums/Character.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace LctMonolith.Models.Enums;
|
||||
|
||||
public enum Character
|
||||
{
|
||||
None,
|
||||
Assistant,
|
||||
Pilot,
|
||||
Janitor,
|
||||
Administrator,
|
||||
Mechanic
|
||||
}
|
||||
18
LctMonolith/Models/Enums/CharacterAnimation.cs
Normal file
18
LctMonolith/Models/Enums/CharacterAnimation.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace LctMonolith.Models.Enums;
|
||||
|
||||
public enum CharacterAnimation
|
||||
{
|
||||
Neutral,
|
||||
Happy,
|
||||
Laughter,
|
||||
Mock,
|
||||
Sad,
|
||||
Crying,
|
||||
Annoyed,
|
||||
Angry,
|
||||
Threats,
|
||||
Wave,
|
||||
Silhouette,
|
||||
Scared,
|
||||
Embarassed
|
||||
}
|
||||
9
LctMonolith/Models/Enums/MessageStyle.cs
Normal file
9
LctMonolith/Models/Enums/MessageStyle.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace LctMonolith.Models.Enums;
|
||||
|
||||
public enum MessageStyle
|
||||
{
|
||||
Normal,
|
||||
Loud,
|
||||
Think,
|
||||
Action
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class Mission
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Title { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public string? Branch { get; set; }
|
||||
public MissionCategory Category { get; set; }
|
||||
public Guid? MinRankId { get; set; }
|
||||
public Rank? MinRank { get; set; }
|
||||
public int ExperienceReward { get; set; }
|
||||
public int ManaReward { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public ICollection<MissionCompetencyReward> CompetencyRewards { get; set; } = new List<MissionCompetencyReward>();
|
||||
public ICollection<MissionArtifactReward> ArtifactRewards { get; set; } = new List<MissionArtifactReward>();
|
||||
public ICollection<UserMission> UserMissions { get; set; } = new List<UserMission>();
|
||||
public ICollection<RankRequiredMission> RanksRequiring { get; set; } = new List<RankRequiredMission>();
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
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!;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public enum MissionCategory { Quest = 0, Recruiting = 1, Lecture = 2, Simulator = 3 }
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class MissionCompetencyReward
|
||||
{
|
||||
public Guid MissionId { get; set; }
|
||||
public Mission Mission { get; set; } = null!;
|
||||
public Guid CompetencyId { get; set; }
|
||||
public Competency Competency { get; set; } = null!;
|
||||
public int LevelDelta { get; set; }
|
||||
public int ProgressPointsDelta { get; set; }
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public enum MissionStatus
|
||||
{
|
||||
Locked = 0,
|
||||
Available = 1,
|
||||
InProgress = 2,
|
||||
Submitted = 3,
|
||||
Completed = 4,
|
||||
Rejected = 5
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class Rank
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = null!;
|
||||
public int Order { get; set; }
|
||||
public int RequiredExperience { get; set; }
|
||||
public ICollection<RankRequiredMission> RequiredMissions { get; set; } = new List<RankRequiredMission>();
|
||||
public ICollection<RankRequiredCompetency> RequiredCompetencies { get; set; } = new List<RankRequiredCompetency>();
|
||||
public ICollection<AppUser> Users { get; set; } = new List<AppUser>();
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class RankRequiredCompetency
|
||||
{
|
||||
public Guid RankId { get; set; }
|
||||
public Rank Rank { get; set; } = null!;
|
||||
public Guid CompetencyId { get; set; }
|
||||
public Competency Competency { get; set; } = null!;
|
||||
public int MinLevel { get; set; }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class UserCompetency
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public AppUser User { get; set; } = null!;
|
||||
public Guid CompetencyId { get; set; }
|
||||
public Competency Competency { get; set; } = null!;
|
||||
public int Level { get; set; }
|
||||
public int ProgressPoints { get; set; }
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace LctMonolith.Models;
|
||||
|
||||
public class UserMission
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
public AppUser User { get; set; } = null!;
|
||||
public Guid MissionId { get; set; }
|
||||
public Mission Mission { get; set; } = null!;
|
||||
public MissionStatus Status { get; set; } = MissionStatus.Available;
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
public string? SubmissionData { get; set; }
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.Text;
|
||||
using LctMonolith.Models; // replaced Domain.Entities
|
||||
using LctMonolith.Models.Database; // replaced Domain.Entities
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using LctMonolith.Application.Middleware;
|
||||
using LctMonolith.Services;
|
||||
@@ -95,7 +95,7 @@ builder.Services.AddScoped<IUnitOfWork, UnitOfWork>();
|
||||
|
||||
// Domain services
|
||||
builder.Services.AddScoped<ITokenService, TokenService>();
|
||||
builder.Services.AddScoped<IGamificationService, GamificationService>();
|
||||
builder.Services.AddScoped<IGamificationService, LctMonolith>();
|
||||
builder.Services.AddScoped<IMissionService, MissionService>();
|
||||
builder.Services.AddScoped<IStoreService, StoreService>();
|
||||
builder.Services.AddScoped<INotificationService, NotificationService>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using LctMonolith.Database.UnitOfWork;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
|
||||
namespace LctMonolith.Services.Contracts;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Linq;
|
||||
using LctMonolith.Database.UnitOfWork;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using LctMonolith.Services.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using LctMonolith.Database.UnitOfWork;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Serilog;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Models;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
|
||||
namespace LctMonolith.Services.Models;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using LctMonolith.Database.UnitOfWork;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Serilog;
|
||||
using System.Text.Json;
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using LctMonolith.Application.Options;
|
||||
using LctMonolith.Database.UnitOfWork;
|
||||
using LctMonolith.Models;
|
||||
using LctMonolith.Models.Database;
|
||||
using LctMonolith.Services.Contracts;
|
||||
using LctMonolith.Services.Models;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
Reference in New Issue
Block a user