const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
    return db.define("applycert", {
        type: DataTypes.STRING,
        cardType: DataTypes.STRING,
        idCardNum: DataTypes.STRING,
        name: DataTypes.STRING,
        mobilePhone: DataTypes.STRING,
        code: DataTypes.STRING,
        message: DataTypes.BIGINT,
        issuer: DataTypes.STRING,
        serialNumber: DataTypes.STRING,
        certNotBefore: DataTypes.STRING,
        certNotAfter: DataTypes.STRING,
        userName: DataTypes.STRING,
    }, {
        paranoid: false,//假的删除
        underscored: true,
        version: true,
        freezeTableName: true,
        timestamps: true,
        updatedAt: false,
        //freezeTableName: true,
        // define the table's name
        tableName: 'p_applycert',
        validate: {},
        indexes: [
            {
                // unique: true,
                // fields: ['user_second_id']
            }
        ]
    });
}
