"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransferDto = void 0;
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
const TransferTypeEnum_1 = require("../enums/TransferTypeEnum");
class TransferDto extends sequelize_1.Model {
}
exports.TransferDto = TransferDto;
TransferDto.attributeModel = {
    from_stop_id: {
        type: sequelize_1.DataTypes.STRING(255),
        allowNull: true,
        primaryKey: true,
    },
    to_stop_id: {
        type: sequelize_1.DataTypes.STRING(255),
        allowNull: true,
        primaryKey: true,
    },
    from_trip_id: {
        type: sequelize_1.DataTypes.STRING(255),
        allowNull: true,
        primaryKey: true,
    },
    to_trip_id: {
        type: sequelize_1.DataTypes.STRING(255),
        allowNull: true,
        primaryKey: true,
    },
    transfer_type: {
        type: sequelize_1.DataTypes.ENUM,
        values: Object.values(TransferTypeEnum_1.GTFSTransferTypeEnum),
        allowNull: false,
    },
    min_transfer_time: {
        type: sequelize_1.DataTypes.INTEGER,
        allowNull: true,
    },
    max_waiting_time: {
        type: sequelize_1.DataTypes.INTEGER,
        allowNull: true,
    },
};
TransferDto.jsonSchema = {
    type: "array",
    items: {
        type: "object",
        properties: {
            from_stop_id: {
                oneOf: [
                    { type: "string", minLength: 1 },
                    { type: "null", nullable: true },
                ],
            },
            to_stop_id: {
                oneOf: [
                    { type: "string", minLength: 1 },
                    { type: "null", nullable: true },
                ],
            },
            from_trip_id: {
                oneOf: [
                    { type: "string", minLength: 1 },
                    { type: "null", nullable: true },
                ],
            },
            to_trip_id: {
                oneOf: [
                    { type: "string", minLength: 1 },
                    { type: "null", nullable: true },
                ],
            },
            transfer_type: {
                type: "string",
                enum: Object.values(TransferTypeEnum_1.GTFSTransferTypeEnum),
            },
            min_transfer_time: {
                oneOf: [
                    { type: "integer", minimum: 0 },
                    { type: "null", nullable: true },
                ],
            },
            max_waiting_time: {
                oneOf: [
                    { type: "integer", minimum: 0 },
                    { type: "null", nullable: true },
                ],
            },
        },
        required: ["transfer_type"],
    },
};
//# sourceMappingURL=TransferDto.js.map