tads4-express/models/produto.js

25 lines
572 B
JavaScript
Raw Normal View History

2024-11-29 01:47:37 +00:00
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class produto extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
2024-11-28 18:59:42 +00:00
}
2024-11-29 01:47:37 +00:00
produto.init({
nome: DataTypes.STRING,
preco: DataTypes.FLOAT,
imagem: DataTypes.STRING
}, {
sequelize,
modelName: 'produto',
});
return produto;
};