open5e / open5e-api

The api for open5e.com
Other
153 stars 96 forks source link

Consider refactoring v2 classnames with parent in the name. #423

Closed augustjohnson closed 4 months ago

augustjohnson commented 7 months ago

Example: CharacterClass is the parent ClassFeature ClassFeatureItem

Race is the parent RaceTrait is the child

Various others.

augustjohnson commented 5 months ago

The convention here will be that:

  1. The model names will be hierarchical.
  2. The top level part of the key is going to be the document key.
  3. The child objects will standardize on a 'parent' field name for the foreign keys, with the exception of top tier objects, which use document.

A RaceTrait object will have a field with parent='srd_barbarian' (for example)

A CreatureActionAttack object will have a field with parent='adult-gold-dragon_claw' for example. (which is a CreatureAction)