-
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.
New Migration Add Talent. New Controller Talent. New IRepository.
- Loading branch information
Showing
27 changed files
with
4,240 additions
and
172 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
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,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.Linq; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Abstract; | ||
|
||
namespace WebApiScrapingData.Domain.Class | ||
{ | ||
[DataContract] | ||
public class Pokemon_Talent : Identity | ||
{ | ||
public long PokemonId { get; set; } | ||
[ForeignKey("PokemonId")] | ||
public virtual Pokemon? Pokemon { get; set; } | ||
|
||
public long TalentId { get; set; } | ||
[ForeignKey("TalentId")] | ||
[DataMember] | ||
public virtual Talent? Talent { 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Abstract; | ||
using WebApiScrapingData.Domain.Constantes; | ||
|
||
namespace WebApiScrapingData.Domain.Class | ||
{ | ||
[DataContract] | ||
public class Talent : Identity | ||
{ | ||
[DataMember(Name = DataMember.Name_FR)] | ||
public string? Name_FR { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_FR)] | ||
public string? Description_FR { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_EN)] | ||
public string? Name_EN { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_EN)] | ||
public string? Description_EN { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_ES)] | ||
public string? Name_ES { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_ES)] | ||
public string? Description_ES { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_IT)] | ||
public string? Name_IT { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_IT)] | ||
public string? Description_IT { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_DE)] | ||
public string? Name_DE { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_DE)] | ||
public string? Description_DE { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_RU)] | ||
public string? Name_RU { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_RU)] | ||
public string? Description_RU { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_CO)] | ||
public string? Name_CO { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_CO)] | ||
public string? Description_CO { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_CN)] | ||
public string? Name_CN { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_CN)] | ||
public string? Description_CN { get; set; } | ||
|
||
[DataMember(Name = DataMember.Name_JP)] | ||
public string? Name_JP { get; set; } | ||
|
||
[DataMember(Name = DataMember.Description_JP)] | ||
public string? Description_JP { get; set; } | ||
|
||
public List<Pokemon_Talent>? Pokemon_TypePoks { 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
17 changes: 17 additions & 0 deletions
17
WebApiScrapingData.Framework/Repositories/IRepositoryExtendsPokemon.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,17 @@ | ||
using Microsoft.AspNetCore.Identity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Class.Quizz; | ||
using WebApiScrapingData.Framework; | ||
|
||
namespace WebApiScrapingData.Core.Repositories.RepositoriesQuizz | ||
{ | ||
public interface IRepositoryExtendsPokemon<TEntity> : IRepository<TEntity> where TEntity : class | ||
{ | ||
Task<IEnumerable<TEntity>> GetAllLight(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
WebApiScrapingData.Framework/Repositories/RepositoriesQuizz/IRepositoryExtendsAnwers.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,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Abstract; | ||
using WebApiScrapingData.Domain.Class.Quizz; | ||
using WebApiScrapingData.Domain.Class; | ||
|
||
namespace WebApiScrapingData.Core.Repositories.RepositoriesQuizz | ||
{ | ||
public interface IRepositoryExtendsAnswer<TEntity> : IRepository<TEntity> where TEntity : class | ||
{ | ||
Task<string> GenerateCorrectAnswers(QuestionType questionType, List<Pokemon> pokemonsAnswer); | ||
Task<string> GenerateCorrectAnswers(QuestionType questionType, List<TypePok> typesAnswer); | ||
Task<string> GenerateCorrectAnswers(QuestionType questionType, List<Talent> talentsAnswer, bool Reverse); | ||
Task<string> GenerateCorrectAnswers(QuestionType questionType, List<Talent> talentsAnswer); | ||
Task<string> GenerateCorrectAnswersDesc(QuestionType questionType, List<Pokemon> pokemonsAnswer); | ||
Task<string> GenerateCorrectAnswersStat(QuestionType questionType, List<Pokemon> pokemonsAnswer, string typeStat); | ||
Task<List<Answer>> GenerateAnswers(Quizz quizz, QuestionType questionType, List<Answer> answers); | ||
Task<string> ConvertDescription(Pokemon pokemon); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
WebApiScrapingData.Framework/Repositories/RepositoriesQuizz/IRepositoryExtendsQuestion.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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Abstract; | ||
|
||
namespace WebApiScrapingData.Core.Repositories.RepositoriesQuizz | ||
{ | ||
public interface IRepositoryExtendsQuestion<TEntity> : IRepository<TEntity> where TEntity : class | ||
{ | ||
Task<string> GenerateQuestions(bool gen1, bool gen2, bool gen3, bool gen4, bool gen5, bool gen6, bool gen7, bool gen8, bool genArceus, bool easy, bool normal, bool hard); | ||
Task<int> GetNbQuestionByDifficulty(bool easy, bool normal, bool hard); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
WebApiScrapingData.Framework/Repositories/RepositoriesQuizz/IRepositoryExtendsQuizz.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,17 @@ | ||
using Microsoft.AspNetCore.Identity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using WebApiScrapingData.Domain.Class.Quizz; | ||
using WebApiScrapingData.Framework; | ||
|
||
namespace WebApiScrapingData.Core.Repositories.RepositoriesQuizz | ||
{ | ||
public interface IRepositoryExtendsQuizz<TEntity> : IRepository<TEntity> where TEntity : class | ||
{ | ||
Task<TEntity> GenerateQuizz(IdentityUser profile, bool gen1, bool gen2, bool gen3, bool gen4, bool gen5, bool gen6, bool gen7, bool gen8, bool genArceus, bool easy, bool normal, bool hard); | ||
} | ||
} |
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.