Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Listing configuration modelling

Mark Hester edited this page Jun 8, 2019 · 5 revisions

Introduction

Modelling the configuration presents two problems, 1. speed, 2. searching, the solution is horizontal column scaling on the database, this prevents users from adding their own config entries however future changes could allow an extra_configs table with vertical scaling.

Retrievable model entries

  • max_base_level
  • max_job_level
  • max_stats
  • max_aspd
  • base_exp_rate
  • job_exp_rate
  • instant_cast_stat
  • drop_base_rate
  • drop_card_rate
  • drop_base_mvp_rate
  • drop_base_special_rate
  • drop_card_special_rate

Observers

To provide faster speeds on querying and allow logic to only happen when needed we apply logic to the configuration events updating and creating allowing the rate title to be searched based on its base_exp, this observer can be found in app/Observers/ConfigurationObserver.php

Changing the entries

Changing the entries should be restricted as it would interfere with the operation of the platform, however for testing purposes and updates that may occur we must edit the following files.

  1. app/Listings/ListingConfiguration.php (Modification of the fillable columns)
  2. resources/js/components/FilteredListingSearch.vue (Frontend dropdown search lists)
  3. database/factories/ListingFactory.php (Allows testing and fake data building)
  4. database/migrations/2018_09_16_101736_create_server_table.php (DB structure)
  5. tests/Unit/ListingConfigurationTest.php (Tests consistency of the class)