Skip to content

Character model  #6

Open
Open
@jtkaufman737

Description

@jtkaufman737

Things that need to be persistent/universal I'm trying to include, things that aren't/don't I'm trying to leave to the frontend logic. There's some grays areas in that though so chime in.

  • character id: unique UUID field
  • user ID: FK UUID string
  • name: varchar
  • abilities: I can't tell if this, and the other random stuff like equipment, might be easier dealt with by sticking them in a normalized table where the different attributes could be grabbed. That would look sort of like the attached image, where the data would be collected through the mechanism of the pointer ID for the character (in this case, we'd grab the appropriate record under 6 for that character, and look up the values we need ad hoc)
    screen shot 2018-11-06 at 8 33 25 pm
    We could have a trigger on character creation that would create those records from random values and insert them into the normalized table. Or, it could I guess be a frontend function to randomize abilities and just write to the db through a POST.
  • languages: not sure what the most appropriate thing here is. May also be a candidate for normalized table
  • equipment: same deal, this will be multiple things and isn't well suited to a character table I don't think. Its going to change and have varying numbers of values throughout game play

The alternative I guess to dumping them in normalized tables or one big normalized table would be just having smaller other tables for each of these things - abilities - equipment - etc and dealing with it through joins as it comes up. (Although may be six in one, half dozen in another - both kind of get at the same point).

A SECOND alternative mentioned is that abilities may be an exception - they are going to be pretty universal to characters so maybe including them as additional columns is fair game. But maybe not the other stuff

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions