This commit is contained in:
newtbot
2023-12-29 02:21:28 +08:00
parent 990fa8ff34
commit 3913d0d2f7
15 changed files with 118 additions and 124 deletions

View File

@ -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 };