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

28 lines
630 B

const { DataTypes } = require("sequelize");
const seq = require("../db/seq");
const Account = seq.define("chicken_account", {
// id 会被sequelize自动创建, 管理
username: {
type: DataTypes.STRING,
allowNull: false,
unique: true,
comment: "用户名, 唯一",
},
password: {
type: DataTypes.CHAR(64),
allowNull: false,
comment: "密码",
},
role: {
type: DataTypes.INTEGER,
allowNull: false,
comment: "用户角色, 0: 普通管理员; 1: 超级管理员",
},
});
// 强制同步数据库(创建数据表)
// Account.sync({ force: true });
module.exports = Account;