summaryrefslogtreecommitdiff
path: root/src/routers/vault/models/evol/char_reg_num_db.js
blob: a38df4204215c1c23e3a6b80f4d240a4390149a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { DataTypes } = require("sequelize"); // from npm registry

module.exports = {
    fields: {
        charId: {
            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: ["char_id"] },
        ],
    }
};