"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetroRunsMessagesModel = void 0;
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
class MetroRunsMessagesModel extends sequelize_1.Model {
}
exports.MetroRunsMessagesModel = MetroRunsMessagesModel;
MetroRunsMessagesModel.TABLE_NAME = "vehiclepositions_metro_runs_messages";
MetroRunsMessagesModel.attributeModel = {
    route_name: {
        type: sequelize_1.DataTypes.CHAR(1),
        primaryKey: true,
    },
    message_timestamp: {
        type: sequelize_1.DataTypes.DATE,
        primaryKey: true,
    },
    train_set_number_scheduled: {
        type: sequelize_1.DataTypes.STRING(15),
        allowNull: false,
    },
    train_set_number_real: {
        type: sequelize_1.DataTypes.STRING(15),
        allowNull: false,
    },
    train_number: {
        type: sequelize_1.DataTypes.STRING(15),
        primaryKey: true,
    },
    track_id: {
        type: sequelize_1.DataTypes.STRING(15),
        primaryKey: true,
    },
    delay_origin: {
        type: sequelize_1.DataTypes.SMALLINT,
        allowNull: false,
    },
    actual_position_timestamp_scheduled: {
        type: sequelize_1.DataTypes.DATE,
        allowNull: false,
    },
};
MetroRunsMessagesModel.arrayJsonSchema = {
    type: "array",
    items: {
        type: "object",
        properties: {
            route_name: {
                type: "string",
            },
            message_timestamp: {
                type: "object",
                required: ["toISOString"],
            },
            train_set_number_scheduled: {
                type: "string",
            },
            train_set_number_real: {
                type: "string",
            },
            train_number: {
                type: "string",
            },
            track_id: {
                type: "string",
            },
            delay_origin: {
                type: "integer",
            },
            actual_position_timestamp_scheduled: {
                type: "object",
                required: ["toISOString"],
            },
        },
        required: [
            "route_name",
            "message_timestamp",
            "train_set_number_scheduled",
            "train_set_number_real",
            "train_number",
            "track_id",
            "delay_origin",
            "actual_position_timestamp_scheduled",
        ],
    },
};
//# sourceMappingURL=MetroRunsMessagesModel.js.map