refactor bonfire to loopback json
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
var mongoose = require('mongoose');
|
||||
/**
|
||||
*
|
||||
* @type {exports.Schema}
|
||||
*/
|
||||
|
||||
var bonfireSchema = new mongoose.Schema({
|
||||
name: {
|
||||
type: String,
|
||||
unique: true
|
||||
},
|
||||
difficulty: String,
|
||||
description: Array,
|
||||
tests: Array,
|
||||
challengeSeed: Array,
|
||||
MDNlinks: [String]
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Bonfire', bonfireSchema);
|
23
common/models/bonfire.json
Normal file
23
common/models/bonfire.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "bonfire",
|
||||
"base": "PersistedModel",
|
||||
"trackChanges": false,
|
||||
"idInjection": true,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"unique": true
|
||||
},
|
||||
"difficulty": "string",
|
||||
"description": "array",
|
||||
"tests": "array",
|
||||
"challengeSeed": "array",
|
||||
"MDNlinks": {
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {},
|
||||
"acls": [],
|
||||
"methods": []
|
||||
}
|
Reference in New Issue
Block a user