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
24 lines
577 B
const { DataTypes } = require("sequelize");
|
|
|
|
const seq = require("../db/seq");
|
|
|
|
const Config = seq.define("chicken_config", {
|
|
// id 会被sequelize自动创建, 管理
|
|
house_id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
unique: true,
|
|
comment: "所属鸡场id, 相当于外键",
|
|
},
|
|
market_life_min: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: 0,
|
|
comment: "出栏日龄,限制最小的出栏日龄,单位天",
|
|
},
|
|
});
|
|
|
|
// 强制同步数据库(创建数据表)
|
|
// Config.sync({ force: true });
|
|
|
|
module.exports = Config;
|