Squashed 'backend/' content from commit fa83223
git-subtree-dir: backend git-subtree-split: fa832234607d359848516c9334f2eec45f64969e
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { SimpleMessage } from "@/notif"
|
||||
import mongoose, { Types, Schema } from "mongoose"
|
||||
|
||||
export interface IInbox {
|
||||
message: SimpleMessage,
|
||||
sentDate: Date,
|
||||
rcpt: Types.ObjectId[],
|
||||
ack: Types.ObjectId[]
|
||||
}
|
||||
|
||||
const inboxSchema = new Schema<IInbox>({
|
||||
message: {type: Object, required: true},
|
||||
sentDate: {type: Date, required: true, default: Date.now()},
|
||||
rcpt: [{type: Schema.Types.ObjectId, ref: "logins", required: true}],
|
||||
ack: [{type: Schema.Types.ObjectId, ref: "logins", required: true, default: []}],
|
||||
})
|
||||
|
||||
export default mongoose.model("inbox", inboxSchema)
|
||||
Reference in New Issue
Block a user