├── FunctionApp.ETL
├── host.json
├── DISupport
│ ├── InjectAttribute.cs
│ ├── InjectBindingProvider.cs
│ ├── ScopeCleanupFilter.cs
│ ├── InjectConfiguration.cs
│ └── InjectBinding.cs
├── Properties
│ └── PublishProfiles
│ │ └── FFRKFunctionApp - Web Deploy.pubxml
├── ExecuteImport.cs
├── ExecuteMerge.cs
├── ValidateSourceData.cs
├── ExecuteTransform.cs
├── StoreImport.cs
├── StoreMerge.cs
├── StoreTransform.cs
└── GetFormattedDate.cs
├── Infra.Options.EnlirETL
├── ApplicationOptions.cs
├── SheetsServiceOptions.cs
├── OtherImporterOptions.cs
├── AbilityImporterOptions.cs
├── CommandImporterOptions.cs
├── DungeonImporterOptions.cs
├── EventImporterOptions.cs
├── MissionImporterOptions.cs
├── RelicImporterOptions.cs
├── StatusImporterOptions.cs
├── MagiciteImporterOptions.cs
├── SoulBreakImporterOptions.cs
├── BraveActionImporterOptions.cs
├── ExperienceImporterOptions.cs
├── LegendMateriaImporterOptions.cs
├── MagiciteSkillImporterOptions.cs
├── RecordMateriaImporterOptions..cs
├── FileMergeStorageOptions.cs
├── FileImportStorageOptions.cs
├── FileTransformStorageOptions.cs
├── LoggingOptions.cs
├── Infra.Options.EnlirETL.csproj
├── CharacterImporterOptions.cs
├── ApiExternalWebsiteOptions.cs
├── CachingOptions.cs
├── LegendSphereImporterOptions.cs
├── RecordSphereImporterOptions.cs
├── ImporterOptions.cs
└── AzureBlobStorageOptions.cs
├── Dto.Api
├── ItemWithItemCount.cs
├── ItemWithStarLevel.cs
├── ItemWithCountAndStarLevel.cs
├── Banners
│ ├── SelectionDomain.cs
│ ├── PrizeResultRow.cs
│ ├── PrizeSelectionRow.cs
│ ├── BannerRelicMetadata.cs
│ ├── PullResultRow.cs
│ └── PrizeSelectionsForSuccessInfo.cs
├── CharacterRating
│ ├── LegendMateriaSummaryInfo.cs
│ ├── RatingPoolRankInfo.cs
│ ├── RatingPool.cs
│ ├── CharacterRatingContextInfo.cs
│ └── AltemaCharacterInfo.cs
├── Dto.Api.csproj
├── Mission.cs
├── Status.cs
├── RecordMateria.cs
├── RecordSphere.cs
├── LegendMateria.cs
├── LegendSphere.cs
├── TypeListBundle.cs
├── Dungeon.cs
├── MagiciteSkill.cs
├── Command.cs
├── Event.cs
├── Experience.cs
├── Other.cs
├── IdListBundle.cs
├── BraveAction.cs
├── Ability.cs
├── SoulBreak.cs
├── Magicite.cs
└── Relic.cs
├── Api.FFRK
├── appsettings.Development.json
├── appsettings.json
├── Properties
│ ├── launchSettings.json
│ └── PublishProfiles
│ │ └── FFRKApi - Web Deploy.pubxml
├── config.local.json
├── config.json
├── CharacterRatingMappingProfile.cs
├── BannersMappingProfile.cs
├── Controllers
│ └── MaintenanceController.cs
└── Program.cs
├── Model.Api
├── Model.Api.csproj
├── Banners
│ ├── SelectionDomain.cs
│ ├── PrizeResultRow.cs
│ ├── PrizeSelectionRow.cs
│ ├── BannerRelicMetadata.cs
│ ├── PullResultRow.cs
│ └── PrizeSelectionsForSuccessInfo.cs
├── CharacterRating
│ ├── LegendMateriaSummaryInfo.cs
│ ├── RatingPoolRankInfo.cs
│ ├── RatingPool.cs
│ ├── CharacterRatingContextInfo.cs
│ └── AltemaCharacterInfo.cs
├── TypeListBundle.cs
└── IdListBundle.cs
├── Model.EnlirTransform
├── IdLists
│ ├── ITypeList.cs
│ ├── StatSetTypeList.cs
│ ├── DamageFormulaTypeList.cs
│ ├── StatTypeList.cs
│ ├── AbilityTypeList.cs
│ ├── SoulBreakTierList.cs
│ ├── EventTypeList.cs
│ └── MissionTypeList.cs
├── ItemWithItemCount.cs
├── ItemWithStarLevel.cs
├── Model.EnlirTransform.csproj
├── ItemWithCountAndStarLevel.cs
├── Mission.cs
├── Status.cs
├── Converters
│ ├── DateConverter.cs
│ ├── IntConverter.cs
│ ├── StringToBooleanConverter.cs
│ ├── PercentConverter.cs
│ └── TypeListConverter.cs
├── RecordMateria.cs
├── RecordSphere.cs
├── LegendMateria.cs
├── LegendSphere.cs
├── Dungeon.cs
├── IModelDescriptor.cs
├── TransformResultsContainer.cs
├── Command.cs
├── Event.cs
├── MagiciteSkill.cs
├── Experience.cs
├── Other.cs
├── BraveAction.cs
├── Ability.cs
├── SoulBreak.cs
└── Magicite.cs
├── Logic.EnlirImport
├── IRowImporter.cs
├── Logic.EnlirImport.csproj
├── MissionImporter.cs
├── StatusImporter.cs
├── RecordMateriaImporter.cs
├── LegendMateriaImporter.cs
└── DungeonImporter.cs
├── Model.EnlirImport
├── Model.EnlirImport.csproj
├── MissionRow.cs
├── StatusRow.cs
├── RecordMateriaRow.cs
├── LegendMateriaRow.cs
├── DungeonRow.cs
├── OtherRow.cs
├── EventRow.cs
├── ImportResultsContainer.cs
├── CommandRow.cs
├── MagiciteSkillRow.cs
├── LegendSphereRow.cs
├── SoulBreakRow.cs
├── BraveActionRow.cs
└── ExperienceRow.cs
├── Logic.EnlirTransform
├── IRowTransformer.cs
├── Logic.EnlirTransform.csproj
├── MissionTransformer.cs
├── StatusTransformer.cs
└── RecordMateriaTransformer.cs
├── Model.EnlirMerge
└── Model.EnlirMerge.csproj
├── Logic.EnlirMerge
└── Logic.EnlirMerge.csproj
├── Data.Api
├── Data.Api.csproj
├── AltemaCharacterRatingFileRepository.cs
├── AltemaCharacterRatingWebRepository.cs
└── EnlirRepository.cs
├── Logic.Validation
└── Logic.Validation.csproj
├── Logic.Api
├── Logic.Api.csproj
├── CharacterRating
│ ├── AltemaCharacterNodeComponents.cs
│ └── AltemaCharacterNodeParser.cs
├── MaintenanceLogic.cs
└── ExperiencesLogic.cs
├── SheetsApiHelper
└── SheetsApiHelper.csproj
├── Test.Logic.Api
└── Test.Logic.Api.csproj
└── Data.Storage
├── Data.Storage.csproj
├── IImportStorageProvider.cs
├── IMergeStorageProvider.cs
├── ITransformStorageProvider.cs
├── FileMergeStorageProvider.cs
└── FileImportStorageProvider.cs
/FunctionApp.ETL/host.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/ApplicationOptions.cs:
--------------------------------------------------------------------------------
1 | namespace FFRK.Api.Infra.Options.EnlirETL
2 | {
3 | public class ApplicationOptions
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Dto.Api/ItemWithItemCount.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api
2 | {
3 | public class ItemWithItemCount
4 | {
5 | public string ItemName { get; set; }
6 | public int ItemCount { get; set; }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Dto.Api/ItemWithStarLevel.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api
2 | {
3 | public class ItemWithStarLevel
4 | {
5 | public string ItemName { get; set; }
6 | public int ItemStarLevel { get; set; }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Api.FFRK/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/SheetsServiceOptions.cs:
--------------------------------------------------------------------------------
1 | namespace FFRK.Api.Infra.Options.EnlirETL
2 | {
3 | public class SheetsServiceOptions
4 | {
5 | public string Name { get; set; }
6 | public string ApiKey { get; set; }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/OtherImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class OtherImporterOptions: ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/AbilityImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class AbilityImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/CommandImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class CommandImporterOptions: ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/DungeonImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class DungeonImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/EventImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class EventImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/MissionImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class MissionImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/RelicImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class RelicImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/StatusImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class StatusImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/MagiciteImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class MagiciteImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/SoulBreakImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class SoulBreakImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/BraveActionImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class BraveActionImporterOptions: ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/ExperienceImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class ExperienceImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/LegendMateriaImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class LegendMateriaImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/MagiciteSkillImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class MagiciteSkillImporterOptions: ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/RecordMateriaImporterOptions..cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class RecordMateriaImporterOptions : ImporterOptions
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Dto.Api/ItemWithCountAndStarLevel.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api
2 | {
3 | public class ItemWithCountAndStarLevel
4 | {
5 | public string ItemName { get; set; }
6 | public int ItemCount { get; set; }
7 | public int ItemStarLevel { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Api.FFRK/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model.Api/Model.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Model.Api
6 | FFRKApi.Model.Api
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/IdLists/ITypeList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform.IdLists
6 | {
7 | public interface ITypeList
8 | {
9 | IList> TypeList { get; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/FileMergeStorageOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class FileMergeStorageOptions
8 | {
9 | public string MergeResultsStoragePath { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Logic.EnlirImport/IRowImporter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Runtime.InteropServices;
4 | using System.Text;
5 |
6 | namespace FFRKApi.Logic.EnlirImport
7 | {
8 | public interface IRowImporter where T : class
9 | {
10 | IEnumerable Import();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/FileImportStorageOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class FileImportStorageOptions
8 | {
9 | public string ImportResultsStoragePath { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/FileTransformStorageOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class FileTransformStorageOptions
8 | {
9 | public string TransformResultsStoragePath { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/LoggingOptions.cs:
--------------------------------------------------------------------------------
1 | namespace FFRK.Api.Infra.Options.EnlirETL
2 | {
3 | public class LoggingOptions
4 | {
5 | public string LogFilePath { get; set; }
6 |
7 | public string ApplicationInsightsKey { get; set; }
8 |
9 | public string AppComponentName { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Model.EnlirImport/Model.EnlirImport.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Model.EnlirImport
6 | FFRKApi.Model.EnlirImport
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/ItemWithItemCount.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class ItemWithItemCount
8 | {
9 | public string ItemName { get; set; }
10 | public int ItemCount { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/ItemWithStarLevel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class ItemWithStarLevel
8 | {
9 | public string ItemName { get; set; }
10 | public int ItemStarLevel { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/FunctionApp.ETL/DISupport/InjectAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Azure.WebJobs.Description;
3 |
4 | namespace FunctionApp.ETL.DISupport
5 |
6 | {
7 | [Binding]
8 | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
9 | public class InjectAttribute : Attribute
10 | {
11 |
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/Model.EnlirTransform/Model.EnlirTransform.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Model.EnlirTransform
6 | FFRKApi.Model.EnlirTransform
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/Infra.Options.EnlirETL.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRK.Api.Infra.Options.EnlirETL
6 | FFRK.Api.Infra.Options.EnlirETL
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/CharacterImporterOptions.cs:
--------------------------------------------------------------------------------
1 | namespace FFRK.Api.Infra.Options.EnlirETL
2 | {
3 | public class CharacterImporterOptions : ImporterOptions
4 | {
5 | //public string SpreadsheetId { get; set; }
6 | //public string WorkSheetName { get; set; }
7 | //public string RangeExpression { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/SelectionDomain.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api.Banners
4 | {
5 | public class SelectionDomain
6 | {
7 | public string SelectionDomainName { get; set; }
8 | public int PrizesToSelectFromDomainCount { get; set; }
9 | public IList PrizeSelectionTable { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/ApiExternalWebsiteOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class ApiExternalWebsiteOptions
8 | {
9 | public string AltemaCharacterRatingsUrl { get; set; }
10 |
11 | public string PrizeSelectionUrl { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dto.Api/CharacterRating/LegendMateriaSummaryInfo.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.CharacterRating
2 | {
3 | public class LegendMateriaSummaryInfo
4 | {
5 | public int LegendMateriaId { get; set; }
6 | public string LegendMateriaName { get; set; }
7 | public string Effect { get; set; }
8 | public int RelicId { get; set; } //0 = LM1 or LM2
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Dto.Api/CharacterRating/RatingPoolRankInfo.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.CharacterRating
2 | {
3 | public class RatingPoolRankInfo
4 | {
5 | public string RatingPoolName { get; set; } //e.g. LegendDiveMoteType
6 | public int RatingPoolMemberCount { get; set; } //e.g. 55
7 |
8 | public int CharacterRankInRatingPool { get; set; } //e.g. 4
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Model.Api/Banners/SelectionDomain.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Model.Api.Banners
4 | {
5 | public class SelectionDomain
6 | {
7 | public string SelectionDomainName { get; set; }
8 | public int PrizesToSelectFromDomainCount { get; set; }
9 | public IList PrizeSelectionTable { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/ItemWithCountAndStarLevel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class ItemWithCountAndStarLevel
8 | {
9 | public string ItemName { get; set; }
10 | public int ItemCount { get; set; }
11 | public int ItemStarLevel { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dto.Api/Dto.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Dto.Api
6 | FFRKApi.Dto.Api
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/CachingOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class CachingOptions
8 | {
9 | public string ConnectionString { get; set; }
10 | public string DefaultTimeToLiveInHours { get; set; }
11 | public string UseCache { get; set; }
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Logic.EnlirTransform/IRowTransformer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Logic.EnlirTransform
6 | {
7 | public interface IRowTransformer where TRow : class
8 | where TModel : class
9 | {
10 | IEnumerable Transform(IEnumerable importedRows);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Dto.Api/CharacterRating/RatingPool.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api.CharacterRating
4 | {
5 | public class RatingPool
6 | {
7 | public string RatingPoolName { get; set; } //e.g. LegendDiveMoteType
8 | public int RatingPoolMemberCount => CharactersInRatingPool?.Count ?? 0;
9 | public IList CharactersInRatingPool { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/LegendSphereImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class LegendSphereImporterOptions : ImporterOptions
8 | {
9 | //public string SpreadsheetId { get; set; }
10 | //public string WorkSheetName { get; set; }
11 | //public string RangeExpression { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/RecordSphereImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class RecordSphereImporterOptions : ImporterOptions
8 | {
9 | //public string SpreadsheetId { get; set; }
10 | //public string WorkSheetName { get; set; }
11 | //public string RangeExpression { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/ImporterOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class ImporterOptions
8 | {
9 | public string SpreadsheetId { get; set; }
10 | public string WorkSheetName { get; set; }
11 | public string RangeExpression { get; set; }
12 | public int ValueRenderOption { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Model.EnlirMerge/Model.EnlirMerge.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Model.EnlirMerge
6 | FFRKApi.Model.EnlirMerge
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Model.Api/CharacterRating/LegendMateriaSummaryInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api.CharacterRating
6 | {
7 | public class LegendMateriaSummaryInfo
8 | {
9 | public int LegendMateriaId { get; set; }
10 | public string LegendMateriaName { get; set; }
11 | public string Effect { get; set; }
12 | public int RelicId { get; set; } //0 = LM1 or LM2
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Model.Api/CharacterRating/RatingPoolRankInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api.CharacterRating
6 | {
7 | public class RatingPoolRankInfo
8 | {
9 | public string RatingPoolName { get; set; } //e.g. LegendDiveMoteType
10 | public int RatingPoolMemberCount { get; set; } //e.g. 55
11 |
12 | public int CharacterRankInRatingPool { get; set; } //e.g. 4
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model.Api/CharacterRating/RatingPool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace FFRKApi.Model.Api.CharacterRating
7 | {
8 | public class RatingPool
9 | {
10 | public string RatingPoolName { get; set; } //e.g. LegendDiveMoteType
11 | public int RatingPoolMemberCount => CharactersInRatingPool?.Count ?? 0;
12 | public IList CharactersInRatingPool { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Logic.EnlirMerge/Logic.EnlirMerge.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Logic.EnlirMerge
6 | FFRKApi.Logic.EnlirMerge
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/PrizeResultRow.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.Banners
2 | {
3 | public class PrizeResultRow
4 | {
5 | public int PrizeIndex { get; set; } //starting from 1
6 | public string PrizeCategoryName { get; set; }
7 | public string PrizeName { get; set; }
8 | public int PrizeSelectedCount { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return $"{PrizeIndex,-8}{PrizeSelectedCount,-8}{PrizeCategoryName,-25}{PrizeName,-50}";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model.Api/Banners/PrizeResultRow.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Model.Api.Banners
2 | {
3 | public class PrizeResultRow
4 | {
5 | public int PrizeIndex { get; set; } //starting from 1
6 | public string PrizeCategoryName { get; set; }
7 | public string PrizeName { get; set; }
8 | public int PrizeSelectedCount { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return $"{PrizeIndex,-8}{PrizeSelectedCount,-8}{PrizeCategoryName,-25}{PrizeName,-50}";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/PrizeSelectionRow.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.Banners
2 | {
3 | public class PrizeSelectionRow
4 | {
5 | public int PrizeIndex { get; set; } //starting from 1
6 | public double PrizeProbabilityLowerBound { get; set; }
7 | public string PrizeCategoryName { get; set; }
8 | public string PrizeName { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return $"{PrizeIndex,-8}{PrizeProbabilityLowerBound,-25}{PrizeCategoryName,-20}{PrizeName,-50}";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dto.Api/Mission.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class Mission
6 | {
7 | #region IModelDescriptor Implementation
8 | public int Id { get; set; }
9 | public string Description { get; set; }
10 | #endregion
11 |
12 | public int MissionType { get; set; }
13 | public string AssociatedEvent { get; set; }
14 | public int AssociatedEventId { get; set; }
15 | public IEnumerable Rewards { get; set; }
16 | }
17 |
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Model.Api/Banners/PrizeSelectionRow.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Model.Api.Banners
2 | {
3 | public class PrizeSelectionRow
4 | {
5 | public int PrizeIndex { get; set; } //starting from 1
6 | public double PrizeProbabilityLowerBound { get; set; }
7 | public string PrizeCategoryName { get; set; }
8 | public string PrizeName { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return $"{PrizeIndex,-8}{PrizeProbabilityLowerBound,-25}{PrizeCategoryName,-20}{PrizeName,-50}";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Model.EnlirImport/MissionRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirImport
6 | {
7 | public enum MissionColumn
8 | {
9 | Type = 0,
10 | Event = 1,
11 | Description = 2,
12 | Reward = 3
13 | }
14 |
15 |
16 | public class MissionRow
17 | {
18 | public string Type { get; set; }
19 | public string Event { get; set; }
20 | public string Description { get; set; }
21 | public string Reward { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Logic.EnlirImport/Logic.EnlirImport.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Logic.EnlirImport
6 | FFRKApi.Logic.EnlirImport
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/Mission.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class Mission: IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public int MissionType { get; set; }
15 | public string AssociatedEvent { get; set; }
16 | public int AssociatedEventId { get; set; }
17 | public IEnumerable Rewards { get; set; }
18 | }
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Data.Api/Data.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Data.Api
6 | FFRKApi.Data.Api
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Infra.Options.EnlirETL/AzureBlobStorageOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRK.Api.Infra.Options.EnlirETL
6 | {
7 | public class AzureBlobStorageOptions
8 | {
9 | public string StorageAccountName { get; set; }
10 | public string ContainerName { get; set; }
11 | public string ConnectionString { get; set; }
12 |
13 | public string ImportResultsStoragePath { get; set; }
14 |
15 | public string TransformResultsStoragePath { get; set; }
16 |
17 | public string MergeResultsStoragePath { get; set; }
18 |
19 | public string BannerStoragePath { get; set; }
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/BannerRelicMetadata.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.Banners
2 | {
3 | public class BannerRelicMetadata
4 | {
5 | public int BannerSlot { get; set; }
6 | public int RelicId { get; set; }
7 | public string RelicName { get; set; }
8 | public int CharacterId { get; set; }
9 | public string CharacterName { get; set; }
10 | public int SoulBreakId { get; set; }
11 | public string SoulBreakName { get; set; }
12 | public int LegendMateriaId { get; set; }
13 | public string LegendMateriaName { get; set; }
14 | public int SoulBreakTierType { get; set; }
15 | public string SoulBreakTierName { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Logic.Validation/Logic.Validation.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Logic.Validation
6 | FFRKApi.Logic.Validation
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Dto.Api/Status.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class Status
6 | {
7 | #region IModelDescriptor Implementation
8 | public int Id { get; set; }
9 | public string Description { get; set; }
10 | #endregion
11 |
12 | public int StatusId { get; set; }
13 | public string CommonName { get; set; }
14 | public string Effects { get; set; }
15 | public int DefaultDuration { get; set; }
16 | public double MindModifier { get; set; }
17 | public IEnumerable ExclusiveStatuses { get; set; }
18 | public string CodedName { get; set; }
19 | public string Notes { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Logic.Api/Logic.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Logic.Api
6 | FFRKApi.Logic.Api
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Logic.EnlirTransform/Logic.EnlirTransform.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Logic.EnlirTransform
6 | FFRKApi.Logic.EnlirTransform
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/SheetsApiHelper/SheetsApiHelper.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.SheetsApiHelper
6 | FFRKApi.SheetsApiHelper
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Model.Api/Banners/BannerRelicMetadata.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api.Banners
6 | {
7 | public class BannerRelicMetadata
8 | {
9 | public int BannerSlot { get; set; }
10 | public int RelicId { get; set; }
11 | public string RelicName { get; set; }
12 | public int CharacterId { get; set; }
13 | public string CharacterName { get; set; }
14 | public int SoulBreakId { get; set; }
15 | public string SoulBreakName { get; set; }
16 | public int LegendMateriaId { get; set; }
17 | public string LegendMateriaName { get; set; }
18 | public int SoulBreakTierType { get; set; }
19 | public string SoulBreakTierName { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/PullResultRow.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api.Banners
2 | {
3 | public class PullResultRow
4 | {
5 | public int BannerSlot { get; set; }
6 | public int RelicId { get; set; }
7 | public string RelicName { get; set; }
8 | public string CategoryName { get; set; }
9 | public int SelectedCount { get; set; }
10 | public int CharacterId { get; set; }
11 | public string CharacterName { get; set; }
12 | public int SoulBreakId { get; set; }
13 | public string SoulBreakName { get; set; }
14 | public int LegendMateriaId { get; set; }
15 | public string LegendMateriaName { get; set; }
16 | public int SoulBreakTierType { get; set; }
17 | public string SoulBreakTierName { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/Status.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class Status : IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public int StatusId { get; set; }
15 | public string CommonName { get; set; }
16 | public string Effects { get; set; }
17 | public int DefaultDuration { get; set; }
18 | public double MindModifier { get; set; }
19 | public IEnumerable ExclusiveStatuses { get; set; }
20 | public string CodedName { get; set; }
21 | public string Notes { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Api.FFRK/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:25746/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "launchUrl": "swagger/ui",
15 | "environmentVariables": {
16 | "ASPNETCORE_ENVIRONMENT": "local"
17 | }
18 | },
19 | "Api.FFRK": {
20 | "commandName": "Project",
21 | "launchBrowser": true,
22 | "launchUrl": "api/values",
23 | "environmentVariables": {
24 | "ASPNETCORE_ENVIRONMENT": "local"
25 | },
26 | "applicationUrl": "http://localhost:25747/"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Model.Api/Banners/PullResultRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api.Banners
6 | {
7 | public class PullResultRow
8 | {
9 | public int BannerSlot { get; set; }
10 | public int RelicId { get; set; }
11 | public string RelicName { get; set; }
12 | public string CategoryName { get; set; }
13 | public int SelectedCount { get; set; }
14 | public int CharacterId { get; set; }
15 | public string CharacterName { get; set; }
16 | public int SoulBreakId { get; set; }
17 | public string SoulBreakName { get; set; }
18 | public int LegendMateriaId { get; set; }
19 | public string LegendMateriaName { get; set; }
20 | public int SoulBreakTierType { get; set; }
21 | public string SoulBreakTierName { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Model.EnlirImport/StatusRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirImport
6 | {
7 | public enum StatusColumn
8 | {
9 | ID = 0,
10 | CommonName = 1,
11 | Effects = 2,
12 | DefaultDuration = 3,
13 | MindModifier = 4,
14 | ExclusiveStatus = 5,
15 | CodedName = 6,
16 | Notes = 7
17 | }
18 |
19 | public class StatusRow
20 | {
21 | public string ID { get; set; }
22 | public string CommonName { get; set; }
23 | public string Effects { get; set; }
24 | public string DefaultDuration { get; set; }
25 | public string MindModifier { get; set; }
26 | public string ExclusiveStatus { get; set; }
27 | public string CodedName { get; set; }
28 | public string Notes { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Dto.Api/RecordMateria.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api
2 | {
3 | public class RecordMateria
4 | {
5 | #region IModelDescriptor Implementation
6 | public int Id { get; set; }
7 | public string Description { get; set; }
8 | #endregion
9 |
10 | public string RecordMateriaName { get; set; }
11 | public string JapaneseName { get; set; }
12 |
13 | public string ImagePath { get; set; }
14 |
15 |
16 | public string CharacterName { get; set; }
17 | public int CharacterId { get; set; } //filled in during merge phase
18 | public int Realm { get; set; }
19 |
20 |
21 | public string Effect { get; set; }
22 | public string UnlockCriteria { get; set; }
23 | public string EnlirId { get; set; }
24 | public bool IsInGlobal { get; set; }
25 | public bool IsChecked { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/Converters/DateConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 |
6 | namespace FFRKApi.Model.EnlirTransform.Converters
7 | {
8 | public class DateConverter
9 | {
10 | public DateTime ConvertFromEuropeanDateString(string europeanDate)
11 | {
12 | DateTime utcDate = DateTime.MaxValue;
13 |
14 | if (!String.IsNullOrWhiteSpace(europeanDate))
15 | {
16 | try
17 | {
18 | utcDate = DateTime.Parse(europeanDate, new CultureInfo("fr-FR"));
19 | }
20 | catch (Exception)
21 | {
22 | ; //swallow error, it is enough that we report a default data of MaxDate
23 | }
24 | }
25 |
26 |
27 | return utcDate;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Test.Logic.Api/Test.Logic.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Dto.Api/RecordSphere.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class RecordSphere
6 | {
7 | #region IModelDescriptor Implementation
8 | public int Id { get; set; }
9 | public string Description { get; set; }
10 | #endregion
11 |
12 | public string RecordSphereName { get; set; }
13 |
14 | public string CharacterName { get; set; }
15 | public int CharacterId { get; set; } //filled in during merge phase
16 | public int Realm { get; set; }
17 |
18 | public string RecordSpherePrerequisites { get; set; }
19 |
20 | public IEnumerable RecordSphereLevels { get; set; }
21 | }
22 |
23 | public class RecordSphereLevel
24 | {
25 | public int Level { get; set; }
26 | public string Benefit { get; set; }
27 |
28 | public IList RequiredMotes { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/FunctionApp.ETL/DISupport/InjectBindingProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Concurrent;
3 | using System.Threading.Tasks;
4 | using Microsoft.Azure.WebJobs.Host.Bindings;
5 | using Microsoft.Extensions.DependencyInjection;
6 |
7 | namespace FunctionApp.ETL.DISupport
8 | {
9 | public class InjectBindingProvider : IBindingProvider
10 |
11 | {
12 | public static readonly ConcurrentDictionary Scopes = new ConcurrentDictionary();
13 |
14 | private readonly IServiceProvider _serviceProvider;
15 |
16 | public InjectBindingProvider(IServiceProvider serviceProvider) => _serviceProvider = serviceProvider;
17 |
18 | public Task TryCreateAsync(BindingProviderContext context)
19 | {
20 | IBinding binding = new InjectBinding(_serviceProvider, context.Parameter.ParameterType);
21 |
22 | return Task.FromResult(binding);
23 |
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Dto.Api/LegendMateria.cs:
--------------------------------------------------------------------------------
1 | namespace FFRKApi.Dto.Api
2 | {
3 | public class LegendMateria
4 | {
5 | #region IModelDescriptor Implementation
6 | public int Id { get; set; }
7 | public string Description { get; set; }
8 | #endregion
9 |
10 | public string LegendMateriaName { get; set; }
11 | public string JapaneseName { get; set; }
12 | public int Realm { get; set; }
13 | public string CharacterName { get; set; }
14 | public int CharacterId { get; set; } //filled in during merge phase
15 | public string ImagePath { get; set; }
16 |
17 | public string Effect { get; set; }
18 | public string MasteryBonus { get; set; }
19 | public string RelicName { get; set; }
20 | public int RelicId { get; set; }//filled in during merge phase
21 | public string EnlirId { get; set; }
22 | public bool IsInGlobal { get; set; }
23 | public bool IsChecked { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dto.Api/CharacterRating/CharacterRatingContextInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api.CharacterRating
4 | {
5 | public class CharacterRatingContextInfo
6 | {
7 | public int CharacterId { get; set; }
8 | public string CharacterName { get; set; }
9 |
10 | public int AltemaCharacterRating { get; set; }
11 | public int AltemaOrder { get; set; }
12 |
13 | public IList Roles { get; set; }
14 |
15 | public IList ProficientSchools { get; set; }
16 |
17 |
18 | public string LegendDiveMote1Type { get; set; }
19 | public string LegendDiveMote2Type { get; set; }
20 |
21 | public LegendMateriaSummaryInfo LegendMateria1 { get; set; }
22 | public LegendMateriaSummaryInfo LegendMateria2 { get; set; }
23 |
24 | public IList LegendMateriaFromRelics { get; set; }
25 |
26 | public IList RatingPoolRankInfos { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/RecordMateria.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class RecordMateria : IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public string RecordMateriaName { get; set; }
15 | public string JapaneseName { get; set; }
16 |
17 | public string ImagePath { get; set; }
18 |
19 |
20 | public string CharacterName { get; set; }
21 | public int CharacterId { get; set; } //filled in during merge phase
22 | public int Realm { get; set; }
23 |
24 |
25 | public string Effect { get; set; }
26 | public string UnlockCriteria { get; set; }
27 | public string EnlirId { get; set; }
28 | public bool IsInGlobal { get; set; }
29 | public bool IsChecked { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/RecordSphere.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class RecordSphere : IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public string RecordSphereName { get; set; }
15 |
16 | public string CharacterName { get; set; }
17 | public int CharacterId { get; set; } //filled in during merge phase
18 | public int Realm { get; set; }
19 |
20 | public string RecordSpherePrerequisites { get; set; }
21 |
22 | public IEnumerable RecordSphereLevels { get; set; }
23 | }
24 |
25 | public class RecordSphereLevel
26 | {
27 | public int Level { get; set; }
28 | public string Benefit { get; set; }
29 |
30 | public IList RequiredMotes { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Model.Api/CharacterRating/CharacterRatingContextInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api.CharacterRating
6 | {
7 | public class CharacterRatingContextInfo
8 | {
9 | public int CharacterId { get; set; }
10 | public string CharacterName { get; set; }
11 |
12 | public int AltemaCharacterRating { get; set; }
13 | public int AltemaOrder { get; set; }
14 |
15 | public IList Roles { get; set; }
16 |
17 | public IList ProficientSchools { get; set; }
18 |
19 |
20 | public string LegendDiveMote1Type { get; set; }
21 | public string LegendDiveMote2Type { get; set; }
22 |
23 | public LegendMateriaSummaryInfo LegendMateria1 { get; set; }
24 | public LegendMateriaSummaryInfo LegendMateria2 { get; set; }
25 |
26 | public IList LegendMateriaFromRelics { get; set; }
27 |
28 | public IList RatingPoolRankInfos { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/IdLists/StatSetTypeList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform.IdLists
6 | {
7 | public class StatSetTypeList : ITypeList
8 | {
9 | private readonly IList> _typeList = new List>()
10 | {
11 | new KeyValuePair(0, "Unknown"),
12 | new KeyValuePair(1, "Base"),
13 | new KeyValuePair(2, "Standard"),
14 | new KeyValuePair(3, "Max")
15 | };
16 |
17 |
18 | public IList> TypeList => _typeList;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Model.EnlirImport/RecordMateriaRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirImport
6 | {
7 | public enum RecordMateriaColumn
8 | {
9 | Realm = 0,
10 | Character = 1,
11 | ImagePath = 2,
12 | RecordMateriaName = 3,
13 | Effect = 4,
14 | UnlockCriteria = 5,
15 | JapaneseName = 6,
16 | ID = 7,
17 | IsInGlobal = 8,
18 | Checked = 9
19 | }
20 |
21 | public class RecordMateriaRow
22 | {
23 | //General
24 | public string Realm { get; set; }
25 | public string Character { get; set; }
26 | public string ImagePath { get; set; }
27 | public string RecordMateriaName { get; set; }
28 | public string Effect { get; set; }
29 | public string UnlockCriteria { get; set; }
30 | public string JapaneseName { get; set; }
31 | public string ID { get; set; }
32 | public string IsInGlobal { get; set; }
33 | public string Checked { get; set; }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Api.FFRK/config.local.json:
--------------------------------------------------------------------------------
1 | {
2 | "FileMergeStorageOptions": {
3 | "MergeResultsStoragePath": "D:\\Temp\\FFRKApi\\MergeResults-{Date}.json"
4 | },
5 | "AzureBlobStorageOptions": {
6 | "StorageAccountName": "Placeholder",
7 | "ContainerName": "Placeholder",
8 | "ConnectionString": "Placeholder",
9 | "ImportResultsStoragePath": "Import\\ImportResults-{Date}.json",
10 | "TransformResultsStoragePath": "Transform\\TransformResults-{Date}.json",
11 | "MergeResultsStoragePath": "Merge\\MergeResults-{Date}.json",
12 | "BannerStoragePath": "Banner"
13 | },
14 | "LoggingOptions": {
15 | "LogFilePath": "FFRKApi.ETL.Log-{Date}.txt",
16 | "ApplicationInsightsKey": "Placeholder",
17 | "AppComponentName": "Api.FFRK"
18 | },
19 | "CachingOptions": {
20 | "ConnectionString": "Placeholder",
21 | "DefaultTimeToLiveInHours": "2",
22 | "UseCache": "false"
23 | },
24 | "ApiExternalWebsiteOptions": {
25 | "AltemaCharacterRatingsUrl": "https://altema.jp/ffrk/charahyoka",
26 | "PrizeSelectionUrl": "http://localhost:14831/api/v1.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Api.FFRK/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "FileMergeStorageOptions": {
3 | "MergeResultsStoragePath": "D:\\Temp\\FFRKApi\\MergeResults-{Date}.json"
4 | },
5 | "AzureBlobStorageOptions": {
6 | "StorageAccountName": "Placeholder",
7 | "ContainerName": "Placeholder",
8 | "ConnectionString": "Placeholder",
9 | "ImportResultsStoragePath": "Import\\ImportResults-{Date}.json",
10 | "TransformResultsStoragePath": "Transform\\TransformResults-{Date}.json",
11 | "MergeResultsStoragePath": "Merge\\MergeResults-{Date}.json",
12 | "BannerStoragePath": "Banner"
13 | },
14 | "LoggingOptions": {
15 | "LogFilePath": "FFRKApi.ETL.Log-{Date}.txt",
16 | "ApplicationInsightsKey": "Placeholder",
17 | "AppComponentName": "Api.FFRK"
18 | },
19 | "CachingOptions": {
20 | "ConnectionString": "Placeholder",
21 | "DefaultTimeToLiveInHours": "2",
22 | "UseCache": "true"
23 | },
24 | "ApiExternalWebsiteOptions": {
25 | "AltemaCharacterRatingsUrl": "https://altema.jp/ffrk/charahyoka",
26 | "PrizeSelectionUrl": "http://prizeselectionapi.azurewebsites.net/api/v1.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/LegendMateria.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class LegendMateria : IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public string LegendMateriaName { get; set; }
15 | public string JapaneseName { get; set; }
16 | public int Realm { get; set; }
17 | public string CharacterName { get; set; }
18 | public int CharacterId { get; set; } //filled in during merge phase
19 | public string ImagePath { get; set; }
20 |
21 | public string Effect { get; set; }
22 | public string MasteryBonus { get; set; }
23 | public string RelicName { get; set; }
24 | public int RelicId { get; set; }//filled in during merge phase
25 | public string EnlirId { get; set; }
26 | public bool IsInGlobal { get; set; }
27 | public bool IsChecked { get; set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Data.Storage/Data.Storage.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | FFRKApi.Data.Storage
6 | FFRKApi.Data.Storage
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Dto.Api/Banners/PrizeSelectionsForSuccessInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace FFRKApi.Dto.Api.Banners
4 | {
5 | public class PrizeSelectionsForSuccessInfo
6 | {
7 | public int TrialsConducted { get; set; }
8 | public int MinSelectionsRequired { get; set; }
9 | public int MaxSelectionsRequired { get; set; }
10 | public double MedianSelectionsRequired { get; set; }
11 | public int ModeSelectionsRequired { get; set; }
12 | public double MeanSelectionsRequired { get; set; }
13 |
14 | public override string ToString()
15 | {
16 | return $"TrialsConducted: {TrialsConducted}{Environment.NewLine}" +
17 | $"MinPullsRequired: {MinSelectionsRequired}{Environment.NewLine}" +
18 | $"MaxPullsRequired: {MaxSelectionsRequired}{Environment.NewLine}" +
19 | $"MedianPullsRequired: {MedianSelectionsRequired}{Environment.NewLine}" +
20 | $"ModePullsRequired: {ModeSelectionsRequired}{Environment.NewLine}" +
21 | $"MeanPullsRequired: {MeanSelectionsRequired}{Environment.NewLine}";
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Model.EnlirImport/LegendMateriaRow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirImport
6 | {
7 | public enum LegendMateriaColumn
8 | {
9 | Realm = 0,
10 | Character = 1,
11 | ImagePath = 2,
12 | LegendMateriaName = 3,
13 | Effect = 4,
14 | Master = 5,
15 | Relic = 6,
16 | JapaneseName = 7,
17 | ID = 8,
18 | IsInGlobal = 9,
19 | Checked = 10
20 | }
21 |
22 |
23 | public class LegendMateriaRow
24 | {
25 |
26 | //General
27 | public string Realm { get; set; }
28 | public string Character { get; set; }
29 | public string ImagePath { get; set; }
30 | public string LegendMateriaName { get; set; }
31 | public string Effect { get; set; }
32 | public string Master { get; set; }
33 | public string Relic { get; set; }
34 | public string JapaneseName { get; set; }
35 | public string ID { get; set; }
36 | public string IsInGlobal { get; set; }
37 | public string Checked { get; set; }
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Model.Api/Banners/PrizeSelectionsForSuccessInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace FFRKApi.Model.Api.Banners
4 | {
5 | public class PrizeSelectionsForSuccessInfo
6 | {
7 | public int TrialsConducted { get; set; }
8 | public int MinSelectionsRequired { get; set; }
9 | public int MaxSelectionsRequired { get; set; }
10 | public double MedianSelectionsRequired { get; set; }
11 | public int ModeSelectionsRequired { get; set; }
12 | public double MeanSelectionsRequired { get; set; }
13 |
14 | public override string ToString()
15 | {
16 | return $"TrialsConducted: {TrialsConducted}{Environment.NewLine}" +
17 | $"MinPullsRequired: {MinSelectionsRequired}{Environment.NewLine}" +
18 | $"MaxPullsRequired: {MaxSelectionsRequired}{Environment.NewLine}" +
19 | $"MedianPullsRequired: {MedianSelectionsRequired}{Environment.NewLine}" +
20 | $"ModePullsRequired: {ModeSelectionsRequired}{Environment.NewLine}" +
21 | $"MeanPullsRequired: {MeanSelectionsRequired}{Environment.NewLine}";
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Dto.Api/LegendSphere.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class LegendSphere
6 | {
7 | #region IModelDescriptor Implementation
8 | public int Id { get; set; }
9 | public string Description { get; set; }
10 | #endregion
11 |
12 | public int Realm { get; set; }
13 | public string CharacterName { get; set; }
14 | public int CharacterId { get; set; } //filled in during merge phase
15 |
16 | //1 is the top of the legend sphere grid, with the least valuable benefits.
17 | //5 is the bottom of the legend sphere grid, with the most valuable benefits.
18 | public int Tier { get; set; } //filled in during merge phase
19 |
20 | public IEnumerable LegendSphereInfos { get; set; }
21 | }
22 |
23 | public class LegendSphereInfo
24 | {
25 |
26 | //in a given tier, this is the position of the benefit from left to right.
27 | public int Index { get; set; }
28 |
29 | public string Benefit { get; set; }
30 |
31 | public IList RequiredMotes { get; set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Api.FFRK/CharacterRatingMappingProfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using AutoMapper;
6 | using FFRKApi.Model.Api.CharacterRating;
7 | using D = FFRKApi.Dto.Api.CharacterRating;
8 |
9 | namespace FFRKApi.Api.FFRK
10 | {
11 | public class CharacterRatingMappingProfile : Profile
12 | {
13 | public CharacterRatingMappingProfile()
14 | {
15 | CreateMap();
16 | CreateMap();
17 |
18 | CreateMap();
19 | CreateMap();
20 |
21 | CreateMap();
22 | CreateMap();
23 |
24 | CreateMap();
25 | CreateMap();
26 |
27 | CreateMap();
28 | CreateMap();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/IdLists/DamageFormulaTypeList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform.IdLists
6 | {
7 | public class DamageFormulaTypeList : ITypeList
8 | {
9 | private readonly IList> _typeList = new List>()
10 | {
11 | new KeyValuePair(0, "Unknown"),
12 | new KeyValuePair(1, String.Empty),
13 | new KeyValuePair(2, "Hybrid"),
14 | new KeyValuePair(3, "Magical"),
15 | new KeyValuePair(4, "Physical")
16 | };
17 |
18 |
19 | public IList> TypeList => _typeList;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Dto.Api/TypeListBundle.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class TypeListBundle
6 | {
7 | public IEnumerable> AbilityType { get; set; }
8 | public IEnumerable> AutoTargetType { get; set; }
9 | public IEnumerable> DamageFormulaType { get; set; }
10 | public IEnumerable> ElementType { get; set; }
11 | public IEnumerable> EquipmentType { get; set; }
12 | public IEnumerable> EventType { get; set; }
13 | public IEnumerable> MissionType { get; set; }
14 | public IEnumerable> OrbType { get; set; }
15 | public IEnumerable> RealmType { get; set; }
16 | public IEnumerable> RelicType { get; set; }
17 | public IEnumerable> SchoolType { get; set; }
18 | public IEnumerable> SoulBreakTierType { get; set; }
19 | public IEnumerable> TargetType { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/Converters/IntConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 |
6 | namespace FFRKApi.Model.EnlirTransform.Converters
7 | {
8 | public class IntConverter
9 | {
10 | public int ConvertFromStringToInt(string input)
11 | {
12 | int result = 0;
13 |
14 | if (!String.IsNullOrWhiteSpace(input))
15 | {
16 | //trim for safety
17 | string trimmedInput = input.Trim();
18 |
19 | //input number from enlir are in French format when using group separators
20 | NumberFormatInfo provider = new NumberFormatInfo();
21 | provider.NumberDecimalSeparator = ",";
22 | provider.NumberGroupSeparator = ".";
23 | provider.NumberGroupSizes = new int[] { 3 };
24 |
25 | bool converted = Int32.TryParse(trimmedInput, NumberStyles.AllowThousands, provider, out int candidateResult);
26 |
27 | if (converted)
28 | {
29 | result = candidateResult;
30 | }
31 | }
32 |
33 | return result;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/FunctionApp.ETL/DISupport/ScopeCleanupFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 | using Microsoft.Azure.WebJobs.Host;
5 |
6 | namespace FunctionApp.ETL.DISupport
7 | {
8 | public class ScopeCleanupFilter : IFunctionInvocationFilter, IFunctionExceptionFilter
9 | {
10 | public Task OnExceptionAsync(FunctionExceptionContext exceptionContext, CancellationToken cancellationToken)
11 | {
12 | RemoveScope(exceptionContext.FunctionInstanceId);
13 |
14 | return Task.CompletedTask;
15 | }
16 |
17 |
18 |
19 | public Task OnExecutedAsync(FunctionExecutedContext executedContext, CancellationToken cancellationToken)
20 | {
21 | RemoveScope(executedContext.FunctionInstanceId);
22 |
23 | return Task.CompletedTask;
24 | }
25 |
26 | public Task OnExecutingAsync(FunctionExecutingContext executingContext, CancellationToken cancellationToken) => Task.CompletedTask;
27 |
28 | private void RemoveScope(Guid id)
29 | {
30 | if (InjectBindingProvider.Scopes.TryRemove(id, out var scope))
31 | {
32 | scope.Dispose();
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/LegendSphere.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform
6 | {
7 | public class LegendSphere : IModelDescriptor
8 | {
9 | #region IModelDescriptor Implementation
10 | public int Id { get; set; }
11 | public string Description { get; set; }
12 | #endregion
13 |
14 | public int Realm { get; set; }
15 | public string CharacterName { get; set; }
16 | public int CharacterId { get; set; } //filled in during merge phase
17 |
18 | //1 is the top of the legend sphere grid, with the least valuable benefits.
19 | //5 is the bottom of the legend sphere grid, with the most valuable benefits.
20 | public int Tier { get; set; } //filled in during merge phase
21 |
22 | public IEnumerable LegendSphereInfos { get; set; }
23 | }
24 |
25 | public class LegendSphereInfo
26 | {
27 |
28 | //in a given tier, this is the position of the benefit from left to right.
29 | public int Index { get; set; }
30 |
31 | public string Benefit { get; set; }
32 |
33 | public IList RequiredMotes { get; set; }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Logic.Api/CharacterRating/AltemaCharacterNodeComponents.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using HtmlAgilityPack;
5 |
6 | namespace FFRKApi.Logic.Api.CharacterRating
7 | {
8 | public class AltemaCharacterNodeComponents
9 | {
10 | public HtmlNode CharacterNode { get; set; }
11 |
12 | public HtmlNode NameNode { get; set; }
13 | public HtmlNode ImageNode { get; set; }
14 | public HtmlNode RoleNode { get; set; }
15 | public HtmlNode RatingNode { get; set; }
16 |
17 | public HtmlAttribute CharacterIdAttribute { get; set; }
18 | public HtmlAttribute ImageLazyLoadedAttribute { get; set; }
19 | public HtmlAttribute ImageLazySourceAttribute { get; set; }
20 | public HtmlAttribute ImageSourceAttribute { get; set; }
21 |
22 | public bool IsRatedCharacter =>
23 | CharacterNode != null &&
24 | NameNode != null &&
25 | ImageNode != null &&
26 | RoleNode != null &&
27 | RatingNode != null &&
28 | CharacterIdAttribute != null &&
29 | (
30 | ImageLazySourceAttribute != null ||
31 | ImageSourceAttribute != null
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/FunctionApp.ETL/DISupport/InjectConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Azure.WebJobs.Host;
3 | using Microsoft.Azure.WebJobs.Host.Config;
4 | using Microsoft.Extensions.DependencyInjection;
5 |
6 | namespace FunctionApp.ETL.DISupport
7 | {
8 | public class InjectConfiguration : IExtensionConfigProvider
9 | {
10 | #region Class Variables
11 | private IServiceProvider _serviceProvider;
12 | #endregion
13 |
14 | public void Initialize(ExtensionConfigContext context)
15 | {
16 | var services = new ServiceCollection();
17 |
18 | Startup startup = new Startup();
19 |
20 | startup.ConfigureServices(services);
21 |
22 | var serviceProvider = services.BuildServiceProvider(true);
23 |
24 | context
25 | .AddBindingRule()
26 | .Bind(new InjectBindingProvider(serviceProvider));
27 |
28 |
29 | var registry = context.Config.GetService();
30 | var filter = new ScopeCleanupFilter();
31 |
32 | registry.RegisterExtension(typeof(IFunctionInvocationFilter), filter);
33 | registry.RegisterExtension(typeof(IFunctionExceptionFilter), filter);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Data.Storage/IImportStorageProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using FFRKApi.Model.EnlirImport;
5 |
6 | namespace FFRKApi.Data.Storage
7 | {
8 | public interface IImportStorageProvider
9 | {
10 | ///
11 | /// Stores the passed in import results to a storage medium
12 | ///
13 | ///
14 | /// in format yyyy-MM-dd_hh-mm-ss, if null passed in, implementation should use DateTime.UtcNow
15 | ///
16 | string StoreImportResults(ImportResultsContainer importResultsContainer, string formattedDateString);
17 |
18 | ///
19 | /// Gets latest import results.
20 | ///
21 | ///
22 | ImportResultsContainer RetrieveImportResults();
23 |
24 | ///
25 | /// Returns the ImportResults at the given path, or empty ImportResultsContainer if nothing exists at that path
26 | ///
27 | ///
28 | ///
29 | ImportResultsContainer RetrieveImportResults(string path);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Data.Storage/IMergeStorageProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using FFRKApi.Model.EnlirMerge;
5 |
6 | namespace FFRKApi.Data.Storage
7 | {
8 |
9 | public interface IMergeStorageProvider
10 | {
11 | ///
12 | /// Stores the passed in transform results to a storage medium
13 | ///
14 | ///
15 | /// in format yyyy-MM-dd_hh-mm-ss, if null passed in, implementation should use DateTime.UtcNow
16 | ///
17 | string StoreMergeResults(MergeResultsContainer mergeResultsContainer, string formattedDateString);
18 |
19 | ///
20 | /// Gets latest transform results.
21 | ///
22 | ///
23 | MergeResultsContainer RetrieveMergeResults();
24 |
25 | ///
26 | /// Returns the MergeResults at the given path, or empty MergeResultsContainer if nothing exists at that path
27 | ///
28 | ///
29 | ///
30 | MergeResultsContainer RetrieveMergeResults(string path);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Model.Api/TypeListBundle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.Api
6 | {
7 | public class TypeListBundle
8 | {
9 | public IEnumerable> AbilityType { get; set; }
10 | public IEnumerable> AutoTargetType { get; set; }
11 | public IEnumerable> DamageFormulaType { get; set; }
12 | public IEnumerable> ElementType { get; set; }
13 | public IEnumerable> EquipmentType { get; set; }
14 | public IEnumerable> EventType { get; set; }
15 | public IEnumerable> MissionType { get; set; }
16 | public IEnumerable> OrbType { get; set; }
17 | public IEnumerable> RealmType { get; set; }
18 | public IEnumerable> RelicType { get; set; }
19 | public IEnumerable> SchoolType { get; set; }
20 | public IEnumerable> SoulBreakTierType { get; set; }
21 | public IEnumerable> TargetType { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Dto.Api/Dungeon.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace FFRKApi.Dto.Api
4 | {
5 | public class Dungeon
6 | {
7 | #region IModelDescriptor Implementation
8 | public int Id { get; set; }
9 | public string Description { get; set; }
10 | #endregion
11 |
12 | public int Realm { get; set; }
13 | public string DungeonName { get; set; }
14 |
15 | public string IntroducingEvent { get; set; }
16 | public int IntroducingEventId { get; set; }
17 |
18 | //Classic
19 | public int StaminaClassic { get; set; }
20 | public int DifficultyClassic { get; set; }
21 | public int CompletionGilClassic { get; set; }
22 | public IEnumerable FirstTimeRewardsClassic { get; set; }
23 | public IEnumerable MasteryRewardsClassic { get; set; }
24 |
25 | //Elite
26 | public int StaminaElite { get; set; }
27 | public int DifficultyElite { get; set; }
28 | public int CompletionGilElite { get; set; }
29 | public IEnumerable FirstTimeRewardsElite { get; set; }
30 | public IEnumerable MasteryRewardsElite { get; set; }
31 |
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Model.EnlirTransform/Converters/StringToBooleanConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Model.EnlirTransform.Converters
6 | {
7 | public class StringToBooleanConverter
8 | {
9 | #region Constants
10 | private const string IsCheckedIndicator = "✓";
11 | #endregion
12 |
13 | #region Public Methods
14 | public bool ConvertFromStringToBool(string input)
15 | {
16 | bool result = false;
17 |
18 | if (!String.IsNullOrWhiteSpace(input))
19 | {
20 | switch (input)
21 | {
22 | case "Y":
23 | result = true;
24 | break;
25 | case IsCheckedIndicator:
26 | result = true;
27 | break;
28 | case "N":
29 | result = false;
30 | break;
31 | default:
32 | //leave result false, this is as good a default as any
33 | break;
34 |
35 | }
36 | }
37 |
38 | return result;
39 | }
40 | #endregion
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Api.FFRK/BannersMappingProfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using AutoMapper;
6 | using FFRKApi.Model.Api.Banners;
7 | using D = FFRKApi.Dto.Api.Banners;
8 |
9 | namespace FFRKApi.Api.FFRK
10 | {
11 | public class BannersMappingProfile : Profile
12 | {
13 | public BannersMappingProfile()
14 | {
15 | CreateMap();
16 | CreateMap();
17 |
18 | CreateMap();
19 | CreateMap();
20 |
21 | CreateMap();
22 | CreateMap();
23 |
24 | CreateMap();
25 | CreateMap();
26 |
27 | CreateMap();
28 | CreateMap();
29 |
30 | CreateMap();
31 | CreateMap();
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Data.Storage/ITransformStorageProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using FFRKApi.Model.EnlirTransform;
5 |
6 | namespace FFRKApi.Data.Storage
7 | {
8 | public interface ITransformStorageProvider
9 | {
10 | ///
11 | /// Stores the passed in transform results to a storage medium
12 | ///
13 | ///
14 | /// in format yyyy-MM-dd_hh-mm-ss, if null passed in, implementation should use DateTime.UtcNow
15 | ///
16 | string StoreTransformResults(TransformResultsContainer transformResultsContainer, string formattedDateString);
17 |
18 | ///
19 | /// Gets latest transform results.
20 | ///
21 | ///
22 | TransformResultsContainer RetrieveTransformResults();
23 |
24 | ///
25 | /// Returns the TransformResults at the given path, or empty TransformResultsContainer if nothing exists at that path
26 | ///
27 | ///
28 | ///
29 | TransformResultsContainer RetrieveTransformResults(string path);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Data.Api/AltemaCharacterRatingFileRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace FFRKApi.Data.Api
8 | {
9 | public interface IAltemaCharacterRatingRepository
10 | {
11 | Stream GetAltemaCharacterRatingStream();
12 |
13 | string GetAltemaCharacterRatingString();
14 | }
15 |
16 | //just for testing
17 | public class AltemaCharacterRatingFileRepository : IAltemaCharacterRatingRepository
18 | {
19 | private const string fileName = "Altema_Charyoka_JP_20180418.html";
20 |
21 | public Stream GetAltemaCharacterRatingStream()
22 | {
23 | string directory = Directory.GetCurrentDirectory();
24 |
25 | Stream fileStream = null;
26 |
27 | string filePath = $"{directory}\\{fileName}";
28 |
29 | fileStream = new StreamReader(filePath).BaseStream;
30 |
31 | return fileStream;
32 | }
33 |
34 | public string GetAltemaCharacterRatingString()
35 | {
36 | string directory = Directory.GetCurrentDirectory();
37 |
38 | string filePath = $"{directory}\\{fileName}";
39 |
40 | string text = File.ReadAllText(filePath);
41 |
42 | return text;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Dto.Api/CharacterRating/AltemaCharacterInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace FFRKApi.Dto.Api.CharacterRating
6 | {
7 | public class AltemaCharacterInfo
8 | {
9 | public string Id { get; set; }
10 | public string Name { get; set; }
11 | public string JapaneseName { get; set; }
12 | public string JapaneseRoleSummary { get; set; }
13 | public string RoleSummary { get; set; }
14 | public IList Roles { get; set; }
15 | public int Rating { get; set; }
16 | public int AltemaOrder { get; set; }
17 | public string ImageUrl { get; set; }
18 |
19 | public override string ToString()
20 | {
21 | string rolesText = String.Empty;
22 | StringBuilder rolesBuilder = new StringBuilder();
23 |
24 | foreach (string role in Roles)
25 | {
26 | rolesBuilder.Append(role);
27 | rolesBuilder.Append("; ");
28 | }
29 | rolesText = rolesBuilder.ToString();
30 |
31 | return $"{Id, -25}{Name, -23}{Rating,-6}{rolesText, -50}{JapaneseName, -30}{JapaneseRoleSummary, -25}{ImageUrl, -40}";
32 | //return $"{PrizeIndex}\t\t{PrizeSelectedCount}\t\t{PrizeCategoryName}\t\t{PrizeName}";
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Logic.EnlirImport/MissionImporter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using FFRK.Api.Infra.Options.EnlirETL;
5 | using FFRKApi.Model.EnlirImport;
6 | using FFRKApi.SheetsApiHelper;
7 | using Microsoft.Extensions.Logging;
8 | using Microsoft.Extensions.Options;
9 |
10 | namespace FFRKApi.Logic.EnlirImport
11 | {
12 | public class MissionImporter : RowImporterBase
13 | {
14 | public MissionImporter(ISheetsApiHelper sheetsApiHelper, IOptions importerOptionsAccessor, ILogger> logger)
15 | : base(sheetsApiHelper, importerOptionsAccessor, logger)
16 | {
17 | }
18 |
19 | protected override MissionRow AssignColumnToProperty(int columnCount, IList