work
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
"use strict";
|
||||
const { Sequelize, DataTypes } = require("sequelize");
|
||||
const { sequelize } = require("../mySql.js");
|
||||
const { sequelize } = require("../mySQL");
|
||||
|
||||
const IoTModel = sequelize.define("iot-data",{
|
||||
// Model attributes are defined here
|
||||
id: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
allowNull: true,
|
||||
primaryKey: true,
|
||||
},
|
||||
psiData: {
|
||||
@ -65,6 +65,7 @@ const IoTModel = sequelize.define("iot-data",{
|
||||
},
|
||||
updatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
//appointmentStart: { type: "DATETIME" } // Do this instead
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
@ -73,4 +74,6 @@ const IoTModel = sequelize.define("iot-data",{
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
module.exports = { IoTModel };
|
||||
|
Reference in New Issue
Block a user