"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const P2PApoptosis = require("../../p2p/Apoptosis");
const schemaDefintions_1 = require("../utils/schemaDefintions");
// dont forget to add the certificate field as JSON
const cycles = [
    'cycles',
    {
        networkId: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        counter: {
            type: schemaDefintions_1.SQLDataTypes.BIGINT,
            unique: true,
            primaryKey: true,
            allowNull: false,
        },
        target: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: true },
        mode: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: true },
        safetyMode: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: true },
        safetyNum: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: true },
        networkStateHash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: true },
        networkDataHash: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: true },
        networkReceiptHash: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: true },
        networkSummaryHash: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: true },
        certificate: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        previous: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        marker: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        start: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        duration: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        networkConfigHash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: true },
        maxSyncTime: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: true },
        active: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        syncing: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        standby: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        desired: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        expired: { type: schemaDefintions_1.SQLDataTypes.BIGINT, allowNull: false },
        joined: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        joinedArchivers: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        leavingArchivers: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        joinedConsensors: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        refreshedArchivers: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        refreshedConsensors: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        activated: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        activatedPublicKeys: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        removed: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        appRemoved: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        returned: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        lost: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        lostSyncing: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        refuted: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        nodeListHash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        archiverListHash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        standbyAdd: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        standbyNodeListHash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        standbyRemove: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        lostArchivers: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        refutedArchivers: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        removedArchivers: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        startedSyncing: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        lostAfterSelection: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        finishedSyncing: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        standbyRefresh: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        ...P2PApoptosis.sequelizeCycleFieldModel,
        random: { type: schemaDefintions_1.SQLDataTypes.INTEGER, allowNull: false },
        txadd: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        txremove: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: false },
        txlisthash: { type: schemaDefintions_1.SQLDataTypes.TEXT, allowNull: false },
        archiversAtShutdown: { type: schemaDefintions_1.SQLDataTypes.JSON, allowNull: true },
    },
];
exports.default = cycles;
//# sourceMappingURL=cycles.js.map