This commit is contained in:
2023-10-23 17:25:05 +05:00
parent 6f908a0da1
commit 478554982f
5 changed files with 110 additions and 41 deletions
+25
View File
@@ -0,0 +1,25 @@
import { model, Schema } from "mongoose";
const buildUserSchema = new Schema(
{
buildId: {
type: Schema.Types.ObjectId,
ref: "Build",
required: true,
},
userId: {
type: Schema.Types.ObjectId,
ref: "User",
required: true,
},
},
{
timestamps: true,
toJSON: { virtuals: true },
toObject: { virtuals: true },
}
);
const BuildUser = model("Build_User", buildUserSchema);
export default BuildUser;