"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PositionDto = void 0;
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
class PositionDto extends sequelize_1.Model {
}
exports.PositionDto = PositionDto;
PositionDto.attributeModel = {
    asw_last_stop_id: sequelize_1.DataTypes.STRING, // zast "28010"
    bearing: sequelize_1.DataTypes.INTEGER, // azimut "0"
    cis_last_stop_id: sequelize_1.DataTypes.INTEGER, // zast "28010"
    cis_last_stop_sequence: sequelize_1.DataTypes.INTEGER, // stop_sequence
    delay: sequelize_1.DataTypes.INTEGER,
    delay_stop_arrival: { type: sequelize_1.DataTypes.INTEGER }, // zpoz_prij "426"
    delay_stop_departure: sequelize_1.DataTypes.INTEGER, // zpoz_odj "426"
    id: {
        autoIncrement: true,
        primaryKey: true,
        type: sequelize_1.DataTypes.BIGINT,
    },
    is_canceled: sequelize_1.DataTypes.BOOLEAN, // zrus "false"
    last_stop_arrival_time: sequelize_1.DataTypes.DATE,
    last_stop_departure_time: sequelize_1.DataTypes.DATE,
    last_stop_id: sequelize_1.DataTypes.STRING,
    last_stop_sequence: sequelize_1.DataTypes.INTEGER,
    lat: sequelize_1.DataTypes.DECIMAL, // lat "50.08323"
    lng: sequelize_1.DataTypes.DECIMAL, // lng "14.51035"
    next_stop_arrival_time: sequelize_1.DataTypes.DATE,
    next_stop_departure_time: sequelize_1.DataTypes.DATE,
    next_stop_id: sequelize_1.DataTypes.STRING,
    next_stop_sequence: sequelize_1.DataTypes.INTEGER,
    origin_time: sequelize_1.DataTypes.TIME, // cpoz "11:09:06"
    origin_timestamp: sequelize_1.DataTypes.DATE, // cpoz "11:09:06"
    shape_dist_traveled: sequelize_1.DataTypes.DECIMAL,
    speed: sequelize_1.DataTypes.INTEGER, // rychl "0"
    state_position: sequelize_1.DataTypes.STRING,
    state_process: sequelize_1.DataTypes.STRING,
    this_stop_id: sequelize_1.DataTypes.STRING,
    this_stop_sequence: sequelize_1.DataTypes.INTEGER,
    is_tracked: sequelize_1.DataTypes.BOOLEAN,
    // ⬐ hash(start_timestamp, cis_id, cis_short_name, cis_number);
    trips_id: { type: sequelize_1.DataTypes.STRING },
    tcp_event: { type: sequelize_1.DataTypes.STRING },
    last_stop_headsign: { type: sequelize_1.DataTypes.STRING },
    last_stop_name: { type: sequelize_1.DataTypes.STRING },
    valid_to: sequelize_1.DataTypes.DATE,
    scheduled_timestamp: sequelize_1.DataTypes.DATE,
    origin_position_id: sequelize_1.DataTypes.STRING,
};
PositionDto.jsonSchema = {
    $schema: "http://json-schema.org/draft-04/schema#",
    type: "array",
    items: {
        type: "object",
        properties: {
            id: { type: "string" },
            asw_last_stop_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            bearing: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            cis_last_stop_id: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
            cis_last_stop_sequence: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
            delay: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
            delay_stop_arrival: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
            delay_stop_departure: { oneOf: [{ type: "integer" }, { type: "null", nullable: true }] },
            is_canceled: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
            last_stop_arrival_time: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            last_stop_departure_time: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            last_stop_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            last_stop_sequence: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            lat: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            lng: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            next_stop_arrival_time: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            next_stop_departure_time: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            next_stop_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            next_stop_sequence: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            origin_time: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            origin_timestamp: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "string", format: "date-time" },
                    { type: "null", nullable: true },
                ],
            },
            shape_dist_traveled: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            speed: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            state_position: { type: "string" },
            state_process: { type: "string" },
            this_stop_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            this_stop_sequence: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
            is_tracked: { oneOf: [{ type: "boolean" }, { type: "null", nullable: true }] },
            trips_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            tcp_event: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            last_stop_headsign: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            last_stop_name: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
            valid_to: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            scheduled_timestamp: {
                oneOf: [
                    { type: "object", required: ["toISOString"] },
                    { type: "null", nullable: true },
                ],
            },
            origin_position_id: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
        },
        required: ["state_position", "state_process"],
    },
};
//# sourceMappingURL=PositionDto.js.map