Refactor server with Sequelize ORM, refactor server configs, now will show note status (created or updated) and support docs (note alias)

This commit is contained in:
Cheng-Han, Wu
2016-04-20 18:03:55 +08:00
parent e613aeba75
commit 49b51e478f
35 changed files with 1877 additions and 2120 deletions

19
lib/models/temp.js Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
//external modules
var shortId = require('shortid');
module.exports = function (sequelize, DataTypes) {
var Temp = sequelize.define("Temp", {
id: {
type: DataTypes.STRING,
primaryKey: true,
defaultValue: shortId.generate
},
data: {
type: DataTypes.TEXT
}
});
return Temp;
};