backend validation wip

This commit is contained in:
newtbot
2024-01-02 02:53:44 +08:00
parent a058b1ba70
commit 6342d5a4cb
13 changed files with 410 additions and 211 deletions

View File

@ -12,7 +12,7 @@ const sensorModel = sequelize.define("sensors",
primaryKey: true,
autoIncrement: true,
},
sensortype: {
sensorname: {
type: DataTypes.STRING,
allowNull: false,
length: 10,
@ -22,6 +22,11 @@ const sensorModel = sequelize.define("sensors",
allowNull: false,
length: 10,
},
mac_address: {
type: DataTypes.STRING,
allowNull: false,
length: 12,
},
description: {
type: DataTypes.STRING,
allowNull: true,