import {IDrink} from "./IDrink";
import * as mongoose from "mongoose";

export const DrinkSchema = new mongoose.Schema<IDrink>({
    name: {type: String, required: true},
    ingredients: [{type: {type: mongoose.Types.ObjectId, ref: "Ingredient", required: true}, amount: { type: Number } }]
});

const Drink = mongoose.model<IDrink>('Drink', DrinkSchema);
export default Drink;
