import { model, Schema } from "mongoose"; interface IRole { name: string; priority: number; } const schema = new Schema( { name: { type: String, unique: true }, priority: { type: Number }, }, { toJSON: { versionKey: false } } ); export default model("Role", schema);