update with login hashing not working

This commit is contained in:
BIG2EYEZ
2023-12-19 16:31:35 +08:00
parent e8bc6f9e82
commit e9ed0144aa
7 changed files with 1238 additions and 733 deletions

35
Sean/models/User.js Normal file
View File

@ -0,0 +1,35 @@
// models/User.js
const { Sequelize, DataTypes } = require('sequelize');
const sequelize = new Sequelize(process.env.database, process.env.user, process.env.password, {
host: process.env.host,
dialect: 'mysql',
timezone: 'Z', // Set the timezone to UTC
});
const User = sequelize.define('User', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
username: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
email: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
},
password: {
type: DataTypes.STRING,
allowNull: false,
},
jobTitle: {
type: DataTypes.STRING,
allowNull: false,
},
});
module.exports = User;