石墨消解仪后端用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.

24 lines
577 B

2 years ago
  1. const { DataTypes } = require("sequelize");
  2. const seq = require("../db/seq");
  3. const Config = seq.define("chicken_config", {
  4. // id 会被sequelize自动创建, 管理
  5. house_id: {
  6. type: DataTypes.INTEGER,
  7. allowNull: false,
  8. unique: true,
  9. comment: "所属鸡场id, 相当于外键",
  10. },
  11. market_life_min: {
  12. type: DataTypes.INTEGER,
  13. allowNull: false,
  14. defaultValue: 0,
  15. comment: "出栏日龄,限制最小的出栏日龄,单位天",
  16. },
  17. });
  18. // 强制同步数据库(创建数据表)
  19. // Config.sync({ force: true });
  20. module.exports = Config;