const mongoose = require('mongoose');

const distanceFaresSchema = new mongoose.Schema({
    fareEnvironmentConfigurationId: String,
    riderType: Number,
    transitType: Number,
    startDistanceInMeters: Number,
    endDistanceInMeters: Number,
    stagesOrZonesTraveled: Number,
    mediaType: String,
    baseFare: Number
});

const fromStopToStopFareAdjustmentsSchema = new mongoose.Schema({
    fareEnvironmentConfigurationId: String,
    riderType: Number,
    route: String,
    alightingStop: String,
    boardingStop: String,
    mediaType: String,
    baseFare: Number
});

const fromToStationFaresSchema = new mongoose.Schema({
    fareEnvironmentConfigurationId: String,
    riderType: Number,
    route: String,
    fromStation: String,
    toStation: String,
    isOneWayOnly: Boolean,
    mediaType: String,
    baseFare: Number
});

const DistanceFares = mongoose.model('D_DistanceFares', distanceFaresSchema);

const FromStopToStopFareAdjustments = mongoose.model('D_FromStopToStopFareAdjustments', fromStopToStopFareAdjustmentsSchema);

const FromToStationFares = mongoose.model('D_FromToStationFares', fromToStationFaresSchema);

module.exports = {
    DistanceFares,
    FromStopToStopFareAdjustments,
    FromToStationFares
};
