"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeparturesModel = void 0;
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
class DeparturesModel extends sequelize_1.Model {
}
exports.DeparturesModel = DeparturesModel;
DeparturesModel.TABLE_NAME = "ropidgtfs_precomputed_departures";
DeparturesModel.attributeModel = {
    stop_sequence: {
        type: sequelize_1.DataTypes.SMALLINT,
        allowNull: false,
    },
    stop_headsign: sequelize_1.DataTypes.STRING(70),
    pickup_type: sequelize_1.DataTypes.CHAR(1),
    drop_off_type: sequelize_1.DataTypes.CHAR(1),
    arrival_time: sequelize_1.DataTypes.STRING(20),
    arrival_datetime: sequelize_1.DataTypes.DATE,
    departure_time: sequelize_1.DataTypes.STRING(20),
    departure_datetime: sequelize_1.DataTypes.DATE,
    stop_id: {
        type: sequelize_1.DataTypes.STRING(25),
        allowNull: false,
    },
    stop_name: sequelize_1.DataTypes.STRING(100),
    platform_code: sequelize_1.DataTypes.STRING(10),
    wheelchair_boarding: sequelize_1.DataTypes.SMALLINT,
    min_stop_sequence: sequelize_1.DataTypes.SMALLINT,
    max_stop_sequence: sequelize_1.DataTypes.SMALLINT,
    trip_id: {
        type: sequelize_1.DataTypes.STRING(50),
        allowNull: false,
    },
    trip_headsign: {
        type: sequelize_1.DataTypes.STRING(100),
        allowNull: false,
    },
    trip_short_name: sequelize_1.DataTypes.STRING(50),
    wheelchair_accessible: sequelize_1.DataTypes.SMALLINT,
    service_id: sequelize_1.DataTypes.STRING(30),
    date: sequelize_1.DataTypes.DATE,
    route_short_name: sequelize_1.DataTypes.STRING(50),
    route_type: {
        type: sequelize_1.DataTypes.SMALLINT,
        allowNull: false,
        defaultValue: RouteTypeEnums_1.GTFSRouteTypeEnum.EXT_MISCELLANEOUS,
    },
    route_id: sequelize_1.DataTypes.STRING(20),
    is_night: sequelize_1.DataTypes.CHAR(1),
    is_regional: sequelize_1.DataTypes.CHAR(1),
    is_substitute_transport: sequelize_1.DataTypes.CHAR(1),
    next_stop_sequence: sequelize_1.DataTypes.SMALLINT,
    next_stop_id: sequelize_1.DataTypes.STRING(30),
    last_stop_sequence: sequelize_1.DataTypes.SMALLINT,
    last_stop_id: sequelize_1.DataTypes.STRING(30),
    cis_stop_group_id: sequelize_1.DataTypes.INTEGER,
};
DeparturesModel.jsonSchema = {
    type: "object",
    properties: {
        stop_sequence: {
            type: "integer",
        },
        stop_headsign: {
            type: "string",
        },
        pickup_type: {
            type: "string",
        },
        drop_off_type: {
            type: "string",
        },
        arrival_time: {
            type: "string",
        },
        arrival_datetime: {
            type: "object",
            required: ["toISOString"],
        },
        departure_time: {
            type: "string",
        },
        departure_datetime: {
            type: "object",
            required: ["toISOString"],
        },
        stop_id: {
            type: "string",
        },
        stop_name: {
            type: "string",
        },
        platform_code: {
            type: "string",
        },
        wheelchair_boarding: {
            type: "integer",
        },
        min_stop_sequence: {
            type: "integer",
        },
        max_stop_sequence: {
            type: "integer",
        },
        trip_id: {
            type: "string",
        },
        trip_headsign: {
            type: "string",
        },
        trip_short_name: {
            type: "string",
        },
        wheelchair_accessible: {
            type: "integer",
        },
        service_id: {
            type: "string",
        },
        date: {
            type: "string",
        },
        route_short_name: {
            type: "string",
        },
        route_type: {
            type: "integer",
        },
        route_id: {
            type: "string",
        },
        is_night: {
            type: "string",
        },
        is_regional: {
            type: "string",
        },
        is_substitute_transport: {
            type: "string",
        },
        next_stop_sequence: {
            type: "integer",
        },
        next_stop_id: {
            type: "string",
        },
        last_stop_sequence: {
            type: "integer",
        },
        last_stop_id: {
            type: "string",
        },
        cis_stop_group_id: {
            type: "integer",
        },
    },
    required: ["stop_sequence", "stop_id", "trip_id", "trip_headsign"],
};
//# sourceMappingURL=DeparturesModel.js.map