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.
58 lines
1.5 KiB
58 lines
1.5 KiB
const Sequelize = require('sequelize');
|
|
module.exports = function (sequelize, DataTypes) {
|
|
return sequelize.define('lauchuser', {
|
|
uuid: {
|
|
type: DataTypes.UUID,
|
|
allowNull: false,
|
|
primaryKey: true,
|
|
comment: "用户唯一ID"
|
|
},
|
|
username: {
|
|
type: DataTypes.STRING(255),
|
|
allowNull: false,
|
|
comment: "用户名"
|
|
},
|
|
email: {
|
|
type: DataTypes.STRING(255),
|
|
allowNull: false
|
|
},
|
|
createTime: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
comment: "创建时间"
|
|
},
|
|
status: {
|
|
type: DataTypes.INTEGER.UNSIGNED.ZEROFILL,
|
|
allowNull: false,
|
|
defaultValue: 0000000000,
|
|
comment: "0正常1注销2停用"
|
|
},
|
|
selfSequence: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
comment: "自增序列"
|
|
}
|
|
}, {
|
|
sequelize,
|
|
tableName: 'lauchuser',
|
|
timestamps: false,
|
|
indexes: [
|
|
{
|
|
name: "PRIMARY",
|
|
unique: true,
|
|
using: "BTREE",
|
|
fields: [
|
|
{name: "uuid"},
|
|
]
|
|
},
|
|
{
|
|
name: "selfSequence",
|
|
using: "BTREE",
|
|
fields: [
|
|
{name: "selfSequence"},
|
|
]
|
|
},
|
|
]
|
|
});
|
|
};
|
|
|