Skip to content

Commit

Permalink
Add mongoose formal schema of Game
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed Dec 7, 2017
1 parent 3412cc9 commit 21bd273
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The following fields are appreciated, but not strictly required:
| license | Identifier of the license under whose terms the software is released | [Identifier](https://spdx.org/licenses/) of the license |
| assetLicense | Identifier of the license under whose terms the assets are released | [Identifier](https://spdx.org/licenses/) of the license |
| description | A description of the entry | String |
| gameplayVideo | YouTube URL of a gameplay or trailer video | String, YouTube URL |
| video | YouTube URL of a gameplay or trailer video | String, YouTube URL |
| date | The date the entry was *first* released | String, formatted as `YYYY-MM-DD` (ISO 8601) |
| tags | A list of the categories representing the entry | Array of String of existing categories |
| alias | A list of other names with which the entry can be referred to | Array of String |
Expand Down
26 changes: 26 additions & 0 deletions schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var gameSchema = mongoose.Schema({
data : {
// Required Fields
title : String,
permalink : String, // A.K.A. slug
developer : String, // Should(can) point to user
typetag : String,
platform : String,
rom : String,
screenshots : [String],

// Optional Fields
license : String,
assetLicense : String,
description : String,
video : String,
date : Date,
tags : [String],
alias : [String],
repository : String,
gameWebsite : String,
devWebsite : String,
onlineplay : Boolean

}
});

0 comments on commit 21bd273

Please sign in to comment.