Skip to content

Commit f275449

Browse files
Create-practical-model
1 parent 05572c4 commit f275449

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.eslintrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"ecmaVersion": "latest",
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
}
13+
}

models/practical.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import connector from "#models/databaseUtil";
2+
3+
const practicalSchema = {
4+
no: { type: Number, required: true },
5+
type: { type: String, required: true },
6+
title: { type: String, required: true },
7+
hours: { type: Number, required: true },
8+
cognitiveLevels: {
9+
type: String,
10+
required: true,
11+
enum: ["L1", "L2", "L3", "L4", "L5", "L6"],
12+
},
13+
};
14+
15+
const Practical = connector.model("Practical", practicalSchema);

0 commit comments

Comments
 (0)