import mongoose from 'mongoose'

const deliverySchema = new mongoose.Schema({
    deliveryCode: { type: String, required: true, unique: true },
    deliveryDate: { type: Date, required: true },
    quantityDelivered: { type: Number, required: true },
    deliveryStatus: { type: String, required: true },
    shipment: { type: mongoose.Schema.Types.ObjectId, ref: "Shipment", required: true }
}, { timestamps: true });

export default mongoose.model("Delivery", deliverySchema);