role.model.ts 241 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import { model, Schema } from "mongoose";

interface IRole {
  name: string;
  priority: number;
}

const schema = new Schema<IRole>({
  name: { type: String },
  priority: { type: Number },
});

export default model<IRole>("Role", schema);