summaryrefslogblamecommitdiff
path: root/src/routers/vault/models/evol/global_acc_reg_num_db.js
blob: 2a77fdda037ccb260cadd93062d219a81fc5b078 (plain) (tree)
































                                                                
const { DataTypes } = require("sequelize"); // from npm registry

module.exports = {
    fields: {
        accountId: {
            type: DataTypes.INTEGER.UNSIGNED,
            primaryKey: true,
            allowNull: false,
        },
        key: {
            type: DataTypes.STRING.BINARY,
            primaryKey: true,
            allowNull: false,
        },
        index: {
            type: DataTypes.INTEGER.UNSIGNED,
            primaryKey: true,
            allowNull: false,
            defaultValue: 0,
        },
        value: {
            type: DataTypes.INTEGER,
            allowNull: false,
            defaultValue: 0,
        },
    },
    options: {
        engine: "InnoDB",
        indexes: [
            { fields: ["account_id"] },
        ],
    }
};