import mongoose from "mongoose";

const signalSchema = new mongoose.Schema({
  sensor: String,
  timestamp: Number,
  value: Number,
  error: Number
});

signalSchema.index({ sensor: 1, timestamp: 1 }, { unique: true });

export const Signal = mongoose.model("Signal", signalSchema);