diff --git a/src/models/Permission.ts b/src/models/Permission.ts new file mode 100644 index 0000000..240b271 --- /dev/null +++ b/src/models/Permission.ts @@ -0,0 +1,24 @@ +import {model, ObjectId, Schema} from "mongoose"; + +export interface IPermission { + projectId: ObjectId, + permission: string, + description: string +} + +const PermissionSchema = new Schema({ + projectId: { + type: String, + required: true + }, + permission: { + type: String, + required: true + }, + description: { + type: String, + default: "No description provided" + } +}); + +export const Permission = model("permissions", PermissionSchema); \ No newline at end of file