Credit Journal Entry

Submitted by Brutus5000 on Thu, 07/21/2016 - 09:51
Parent element
Semantic

Player earn Credits

  • for victories
  • for ACU kills
  • fixed regular income over time

Credits can be used to by reinforcements.

Table name
credit_journal
Table structure
  • id [INT, PRIMARY_KEY, AUTO_INCREMENT]
  • fk_character [INT]
  • fk_battle [INT, NULLABLE]: id of the battle, where credits where gained or null if regular income or buy
  • fk_unit_transaction [INT, NULLABLE], id of the reinforcements bought or null if income
  • reason [CHAR] Regular [I]ncome, [V]ictory, ACU [K]ill, [R]einforcements
  • amount [INT]: positive on income, negative on expenses
  • transaction_date [DATETIME]

 

Note: Even though the amount for expenses can be calculated via unit_transaction_details.quantity * units.price, the amount is stored locally, because unit prices may change over time due to balancing reasons.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.