Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
12 changes: 6 additions & 6 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"development": {
"username": "root",
"password": null,
"database": "database_development",
"password": "12345",
"database": "userInformation_db",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"password": "12345",
"database": "userInformation_db",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"database": "database_production",
"password": "12345",
"database": "userInformation_db",
"host": "127.0.0.1",
"dialect": "mysql"
}
Expand Down
22 changes: 0 additions & 22 deletions models/hero.js

This file was deleted.

22 changes: 0 additions & 22 deletions models/map.js

This file was deleted.

73 changes: 0 additions & 73 deletions models/round.js

This file was deleted.

46 changes: 25 additions & 21 deletions models/user.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
module.exports= function(sequelize, DataType){
var User = sequelize.define("User", {
user: {
name: DataTypes.STRING,
password: DataTypes.STRING
module.exports = function(sequelize,DataTypes){
var User = sequelize.define("User",{
userName:{
type:DataTypes.STRING,
allowNull:false,
validate: {
len: [2,100]
}
},
email:{
type: DataTypes.TEXT,
allowNull: false,
validate: {
isEmail:true,
len: [2,100]
}
},
password:{
type: DataTypes.TEXT,
allowNull:false,
validate: {
len: [2,100]
}
}
},
{
// We're saying that we want our User to have Round
classMethods: {
associate: function(models) {
// An User (foreignKey) is required or a Round can't be made
Round.belongsTo(models.User, {
foreignKey: {
allowNull: false
}
});
}
}
}

);
});
return User;
};
}
Binary file modified public/.DS_Store
Binary file not shown.
Loading