/**
 * 会计表
 * @param db
 * @param DataTypes
 * @returns {Model|void|*}
 */
module.exports = (db, DataTypes) => {
    return db.define("accounting", {
        name: { // 姓名
            allowNull: false,
            type: DataTypes.STRING
        },
        agentAccountId: { //易代账ID
            allowNull: true,
            type: DataTypes.STRING
        },
        sex: { //性别
            allowNull: false,
            type: DataTypes.STRING
        },
        age: { //年龄
            allowNull: false,
            type: DataTypes.STRING
        },
        mobile: { //电话
            allowNull: true,
            type: DataTypes.INTEGER
        }
    }, {
        paranoid: false, //假的删除
        underscored: true,
        version: true,
        freezeTableName: true,
        tableName: 'accounting',
        validate: {},
        indexes: []
    });
}