/* eslint-disable*/

'use strict';

module.exports = dc => {
    const DataTypes = dc.ORM;
    const sequelize = dc.orm;
    const User = sequelize.define("user", {
        id: {
            type: DataTypes.INTEGER,
            allowNull: false,
            defaultValue: null,
            comment: "唯一标识",
            primaryKey: true,
            field: "id",
            autoIncrement: true,
            unique: "t_user_id_uindex"
        },
        name: {
            type: DataTypes.STRING,
            allowNull: true,
            defaultValue: null,
            comment: "姓名",
            primaryKey: false,
            field: "name",
            autoIncrement: false
        },
        username: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: null,
            comment: "用户名",
            primaryKey: false,
            field: "username",
            autoIncrement: false
        },
        password: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: null,
            comment: "密码",
            primaryKey: false,
            field: "password",
            autoIncrement: false
        },
        role: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: null,
            comment: "角色",
            primaryKey: false,
            field: "role",
            autoIncrement: false
        },
        enabled: {
            type: DataTypes.BOOLEAN,
            allowNull: true,
            defaultValue: true,
            comment: "是否启用",
            primaryKey: false,
            field: "enabled",
            autoIncrement: false
        }

    }, {
        tableName: "t_user",
        comment: "",
        indexes: []
    });
    dc.models.User = User;
    return User;
};