Commit 83e41a01 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

역할 모델 스키마 변경 toJSON 추가

parent ad70cd38
export { default as User, IUser } from "./user.model"; export { default as User, IUser } from "./user.model";
export { default as Role } from "./role.model";
...@@ -5,9 +5,12 @@ interface IRole { ...@@ -5,9 +5,12 @@ interface IRole {
priority: number; priority: number;
} }
const schema = new Schema<IRole>({ const schema = new Schema<IRole>(
name: { type: String }, {
name: { type: String, unique: true },
priority: { type: Number }, priority: { type: Number },
}); },
{ toJSON: { versionKey: false } }
);
export default model<IRole>("Role", schema); export default model<IRole>("Role", schema);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment