This commit is contained in:
2024-06-12 20:06:30 +05:00
parent e155066534
commit a46547d1fe
19 changed files with 634 additions and 513 deletions
+23
View File
@@ -0,0 +1,23 @@
import { model, Schema } from "mongoose";
const rolesSchema = new Schema(
{
userId: {
type: Schema.Types.ObjectId,
required: true,
},
name: {
type: String,
required: true,
},
},
{
timestamps: true,
toJSON: { virtuals: true },
toObject: { virtuals: true },
}
);
const Roles = model("Roles", rolesSchema);
export default Roles;