module.exports = (sequelize, type) => {
    const AIUsers = sequelize.define('ai_users', {
        id: {
            type: type.INTEGER,
            primaryKey: true,
            autoIncrement: true
        },
        user_name: type.TEXT,
        email: {
            type: type.STRING,
            allowNull: false,
            validate: {
                isEmail: true
            },
            unique: {
                args: true,
                msg: 'Oops. Looks like email already exist.'
            }
        },
        password: type.TEXT,
        role_id: type.INTEGER,
        status: {
            type: type.INTEGER,
            defaultValue: 0
        }
    })
    return AIUsers;
}