diff --git a/models/inbox.ts b/models/inbox.ts index 2335844..ed46ea6 100644 --- a/models/inbox.ts +++ b/models/inbox.ts @@ -8,16 +8,18 @@ import mongoose, { import SequenceFactory from "mongoose-sequence"; import { IPrivMsg } from "./privMsg"; +import { IUser } from "./user"; export interface IInbox { - _id: number; + owningUser: PopulatedDoc; saved: PopulatedDoc[]; received: PopulatedDoc[]; sent: PopulatedDoc[]; } const InboxSchema = new Schema({ - _id: { + owningUser: { type: Number, + ref: "User", }, saved: [ {