UNPKG

giganet_conecta

Version:

Aplicação com o fim de facilitar conexões com APi's e Banco de Dados (MySql & Mongo).

68 lines (63 loc) 1.45 kB
const { Model, DataTypes } = require("sequelize"); module.exports = Gifts_Netflix; async function Gifts_Netflix(sequelize) { class Model_Gifts_Netflix extends Model {} Model_Gifts_Netflix.init( { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, }, codigo: { type: DataTypes.TEXT, allowNull: false, }, valor: { type: DataTypes.DOUBLE, allowNull: false, }, usado_em: { type: DataTypes.TEXT, allowNull: true, }, status: { type: DataTypes.TEXT, allowNull: false, defaultValue: "Disponível", }, data_compra: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW, }, numero_pedido: { type: DataTypes.TEXT, allowNull: true, }, loja: { type: DataTypes.TEXT, allowNull: true, }, cartao: { type: DataTypes.INTEGER, allowNull: true, }, responsavel: { type: DataTypes.TEXT, allowNull: true, }, id_conta: { type: DataTypes.INTEGER, allowNull: true, }, }, { sequelize, timestamps: true, modelName: "gifts_netflix", tableName: "gifts_netflix", } ); return Model_Gifts_Netflix; }