Skip to content

caseyleehanley/game-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

game-service

An example service that was generated using the swift-vapor-api-starter template.

Data Schema

Models

Company

  • id: UUID, Primary Key
  • name: String
  • employee_count: Int

Platform

  • id: UUID, Primary Key
  • name: String
  • release_date: Date
  • rating: Double?
  • company_id: UUID, Foreign Key (references Company.id)

Game

  • id: UUID, Primary Key
  • name: String
  • release_date: Date
  • rating: Double?

Character

  • id: UUID, Primary Key
  • name: String
  • age: Int
  • favorite_color: String?

PlatformGamePivot

  • id: UUID, Primary Key
  • platform_id: UUID, Foreign Key (references Platform.id)
  • game_id: UUID, Foreign Key (references Game.id)

GameCharacterPivot

  • id: UUID, Primary Key
  • game_id: UUID, Foreign Key (references Game.id)
  • character_id: UUID, Foreign Key (references Character.id)

Relationships

  • A Company has many Platforms
  • A Platform belongs to a Company
  • A Platform has many Games (through PlatformGamePivot)
  • A Game belongs to many Platforms (through PlatformGamePivot)
  • A Game has many Characters (through GameCharacterPivot)
  • A Character belongs to many Games (through GameCharacterPivot)

About

Example CRUD API using Swift Vapor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published