Files
internship_node/day4/models/location.js
T

26 lines
511 B
JavaScript
Raw Normal View History

2022-02-06 20:17:46 -05:00
module.exports = (sequelize, DataTypes) => {
const location = sequelize.define(
"location",
{
2022-02-06 20:45:55 -05:00
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
2022-02-06 20:17:46 -05:00
name: DataTypes.STRING,
created_at: DataTypes.DATEONLY,
updated_at: DataTypes.DATE,
},
{
timestamps: true,
freezeTableName: true,
tableName: "location",
},
{
underscoredAll: false,
underscored: false,
}
);
return location;
};