Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.25 KB

CONTRIBUTING.md

File metadata and controls

40 lines (32 loc) · 1.25 KB

Contributing to bookbook

  • "bookbook" is always lowercase
  • commits follow the <type>(<scope>): <description> convention
  • prefer not to use TypeORM Repository's save method (reference)
  • avoid TypeScript enums. If you make one, only type with it like ${MyEnum}

bookbook data models

Election

An election holds candidates and ballots.

  • name - the name of the election
  • is_complete - gets marked by someone with proper permissions

Candidate

Candidates are the options available in an election

  • name
  • data {JSON}

Candidate::Book

not yet implemented Instead of a data column, we should use single table inheritance to extend the Candidate model.

PermissionCode

not yet implemented

  • permission {SET(cast_vote, remove_voter, complete_election)} – a set of abilities available when this code is entered
  • secret – the code that grants the permissions

Vote

  • author
  • candidate_id
  • election_id
  • score

Club

not yet implemented Elections can belong to a club.

Member

not yet implemented Members of a club. When a user locks their account with a passcode we create a member.