Skip to content

Instantly share code, notes, and snippets.

@agustinfece
Last active December 10, 2021 06:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agustinfece/a5d6f50870058df7ff5e27aa8c25ba9d to your computer and use it in GitHub Desktop.
Save agustinfece/a5d6f50870058df7ff5e27aa8c25ba9d to your computer and use it in GitHub Desktop.
user.js
import { Sequelize } from 'sequelize';
import sequelize from '../utils/database.js';
const User = sequelize.define('users', {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
allowNull: false,
primaryKey: true,
},
email: {
type: Sequelize.STRING,
allowNull: false,
},
name: {
type: Sequelize.STRING,
},
password: {
type: Sequelize.STRING,
allowNull: false,
},
});
export default User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment