-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from BinaryStudioAcademy/task/48-combine-main-…
…page Feature/48 -Combine main page with backend
- Loading branch information
Showing
55 changed files
with
23,592 additions
and
1,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
backend/LeetWars.Core/LeetWars.Core.BLL/Interfaces/IUserIdGetter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace LeetWars.Core.BLL.Interfaces | ||
{ | ||
public interface IUserIdGetter | ||
{ | ||
/// <summary> | ||
/// Returns current userId or 0 if no userId is presented | ||
/// </summary> | ||
string CurrentUserId { get; } | ||
|
||
/// <summary> | ||
/// Throws exception if not userId is presented | ||
/// </summary> | ||
/// <returns></returns> | ||
string GetCurrentUserIdOrThrow(); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
backend/LeetWars.Core/LeetWars.Core.BLL/Interfaces/IUserIdSetter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace LeetWars.Core.BLL.Interfaces | ||
{ | ||
public interface IUserIdSetter | ||
{ | ||
void SetUserId(string userId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
backend/LeetWars.Core/LeetWars.Core.Common/DTO/Challenge/ChallengePreviewDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
using LeetWars.Core.Common.DTO.Language; | ||
using LeetWars.Core.Common.DTO.Tag; | ||
using LeetWars.Core.DAL.Entities; | ||
using LeetWars.Core.DAL.Enums; | ||
|
||
namespace LeetWars.Core.Common.DTO.Challenge | ||
{ | ||
public class ChallengePreviewDto : Entity<long> | ||
{ | ||
public string AuthorName { get; set; } = string.Empty; | ||
|
||
public string LevelName { get; set; } = string.Empty; | ||
|
||
public string Title { get; set; } = string.Empty; | ||
|
||
public string Instructions { get; set; } = string.Empty; | ||
|
||
public ChallengeCategory Category { get; set; } | ||
|
||
public ICollection<TagDto>? Tags { get; set; } | ||
|
||
public ICollection<LanguageDto>? Languages { get; set; } | ||
|
||
public int Status { get; set; } | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
backend/LeetWars.Core/LeetWars.Core.Common/DTO/Challenge/NewChallengeDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
namespace LeetWars.Core.DAL.Entities | ||
using LeetWars.Core.DAL.Enums; | ||
|
||
namespace LeetWars.Core.DAL.Entities | ||
{ | ||
public class NewChallengeDto | ||
{ | ||
public long? CreatedBy { get; set; } | ||
public string Title { get; set; } = string.Empty; | ||
public string Instructions { get; set; } = string.Empty; | ||
public int LevelId { get; set; } | ||
public ChallengeCategory Category { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
backend/LeetWars.Core/LeetWars.Core.Common/DTO/ChallengeLevel/ChallengeLevelDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
using LeetWars.Core.DAL.Entities; | ||
using LeetWars.Core.DAL.Enums; | ||
|
||
namespace LeetWars.Core.Common.DTO.ChallengeLevel | ||
{ | ||
public class ChallengeLevelDto : Entity<int> | ||
{ | ||
public string Name { get; set; } = string.Empty; | ||
public int Reward { get; set; } | ||
public LanguageLevel SkillLevel { get; set; } | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
backend/LeetWars.Core/LeetWars.Core.Common/DTO/ChallengeLevel/NewChallengeLevelDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
namespace LeetWars.Core.Common.DTO.ChallengeLevel | ||
using LeetWars.Core.DAL.Enums; | ||
|
||
namespace LeetWars.Core.Common.DTO.ChallengeLevel | ||
{ | ||
public class NewChallengeLevelDto | ||
{ | ||
public string Name { get; set; } = string.Empty; | ||
public int Reward { get; set; } | ||
public LanguageLevel SkillLevel { get; set; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
backend/LeetWars.Core/LeetWars.Core.Common/DTO/Filters/PageSettingsDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace LeetWars.Core.Common.DTO.Filters; | ||
|
||
public class PageSettingsDto | ||
{ | ||
public int PageSize { get; set; } | ||
public int PageNumber { get; set; } | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/LeetWars.Core/LeetWars.Core.Common/DTO/Filters/SuggestionSettingsDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using LeetWars.Core.DAL.Enums; | ||
|
||
namespace LeetWars.Core.Common.DTO.Filters; | ||
|
||
public class SuggestionSettingsDto | ||
{ | ||
public int LanguageId { get; set; } | ||
public SuggestionType SuggestionType { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.