Skip to content

Commit 21bd273

Browse files
committed
Add mongoose formal schema of Game
1 parent 3412cc9 commit 21bd273

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The following fields are appreciated, but not strictly required:
6464
| license | Identifier of the license under whose terms the software is released | [Identifier](https://spdx.org/licenses/) of the license |
6565
| assetLicense | Identifier of the license under whose terms the assets are released | [Identifier](https://spdx.org/licenses/) of the license |
6666
| description | A description of the entry | String |
67-
| gameplayVideo | YouTube URL of a gameplay or trailer video | String, YouTube URL |
67+
| video | YouTube URL of a gameplay or trailer video | String, YouTube URL |
6868
| date | The date the entry was *first* released | String, formatted as `YYYY-MM-DD` (ISO 8601) |
6969
| tags | A list of the categories representing the entry | Array of String of existing categories |
7070
| alias | A list of other names with which the entry can be referred to | Array of String |

schema.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
var gameSchema = mongoose.Schema({
2+
data : {
3+
// Required Fields
4+
title : String,
5+
permalink : String, // A.K.A. slug
6+
developer : String, // Should(can) point to user
7+
typetag : String,
8+
platform : String,
9+
rom : String,
10+
screenshots : [String],
11+
12+
// Optional Fields
13+
license : String,
14+
assetLicense : String,
15+
description : String,
16+
video : String,
17+
date : Date,
18+
tags : [String],
19+
alias : [String],
20+
repository : String,
21+
gameWebsite : String,
22+
devWebsite : String,
23+
onlineplay : Boolean
24+
25+
}
26+
});

0 commit comments

Comments
 (0)