石墨消解仪后端用nodejs编写,与嵌入式端交互和前端交互均用ws
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

36 lines
768 B

const { DataTypes } = require("sequelize");
const seq = require("../db/seq");
// 鸡苗品种
const Device = seq.define("chicken_device", {
// id 会被sequelize自动创建, 管理
egg_gathering: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: 0,
comment: "急蛋设备开关",
},
illumination: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: 0,
comment: "光照开关",
},
air_conditioner: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: 0,
comment: "空调开关",
},
coop_id: {
type: DataTypes.INTEGER,
allowNull: false,
comment: "鸡舍id",
},
});
// 强制同步数据库(创建数据表)
// Device.sync({ force: true });
module.exports = Device;