Skip to content

Commit 943064c

Browse files
authored
Merge pull request #34 from tcet-opensource/setup
some code consistency work and added eslint
2 parents e87f000 + 4c01b3a commit 943064c

File tree

14 files changed

+2240
-172
lines changed

14 files changed

+2240
-172
lines changed

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: "airbnb-base",
7+
overrides: [],
8+
parserOptions: {
9+
ecmaVersion: "latest",
10+
sourceType: "module",
11+
},
12+
rules: {
13+
"linebreak-style": 0,
14+
"no-console": 0,
15+
semi: ["error", "always"],
16+
quotes: ["error", "double"],
17+
},
18+
};

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 2
4+
}

models/emp_bankSchema.js renamed to models/employee/emp_bank.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const { connector } = require("./databaseUtil");
1+
const { connector } = require("../databaseUtil");
22

3-
const EmpBankSchema = {
4-
userId: {
3+
const employeeBankSchema = {
4+
uid: {
55
type: String,
66
required: true,
77
unique: true,
@@ -37,5 +37,5 @@ const EmpBankSchema = {
3737
},
3838
};
3939

40-
const Bank = new connector.model("EmpBank", EmpBankSchema);
40+
const empBank = new connector.model("Employee bank", employeeBankSchema);
4141
module.exports = {};

models/emp_cur_details_model.js renamed to models/employee/emp_cur_detail.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const { connector } = require("./databaseUtil");
1+
const { connector } = require("../databaseUtil");
22

33
const employeeCurrentEmployementSchema = {
4+
uid: {type: String, require: true},
45
date_of_joining: { type: Date, required: true },
56
department_name: { type: String, required: true },
67
designation: { type: String, required: true },
@@ -10,7 +11,7 @@ const employeeCurrentEmployementSchema = {
1011
};
1112

1213
const employeeCurrentEmployement = new connector.model(
13-
"empCurrentDetails",
14+
"Employee current Employement",
1415
employeeCurrentEmployementSchema
1516
);
1617

models/emp_edu_history.js renamed to models/employee/emp_edu_history.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const Education = {
1717
passing_year: { type: String, required: true },
1818
}
1919
const employeeEducationHistorySchema = {
20+
uid: {type: String, require: true},
2021
ssc: { type: Education, required: true },
2122
hsc: { type: Education, required: true },
2223
dip: { type: Education },
@@ -26,4 +27,4 @@ const employeeEducationHistorySchema = {
2627
phd: { type: Education },
2728
pdoc: { type: Education }
2829
}
29-
const employeeEducationHistory = new connector.model('emp-edu-history',employeeEducationHistorySchema);
30+
const employeeEducationHistory = new connector.model('Employee education history',employeeEducationHistorySchema);

models/emp_personal.js renamed to models/employee/emp_personal.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { connector } from './databaseUtil';
22

3-
const empPersonalSchema = {
3+
const employeePersonalSchema = {
4+
uid: {type: String, require:true},
45
title: { type: String, required: true },
56
empFirstName: { type: String, required: true },
67
empMiddleName: { type: String, required: true },
@@ -60,6 +61,6 @@ const empPersonalSchema = {
6061
previousLastName: { type: String },
6162
};
6263

63-
const empPersonal = new connector.model('Employee_Personal', empPersonalSchema);
64+
const empPersonal = new connector.model('Employee personal', employeePersonalSchema);
6465

6566
module.exports = {};

models/std_med_history.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

models/std_bankSchema.js renamed to models/student/std_bank.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { connector } = require("./databaseUtil");
22

3-
const stdBankSchema = {
4-
userId: {
3+
const studentBankSchema = {
4+
uid: {
55
type: String,
66
required: true,
77
unique: true,
@@ -34,5 +34,5 @@ const stdBankSchema = {
3434
},
3535
};
3636

37-
const std_bank = new connector.model("stdBankSchema", stdBankSchema);
37+
const stdBank = new connector.model("Student bank", studentBankSchema);
3838
module.exports = {};

models/std_college.js renamed to models/student/std_college.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,63 @@
1-
const { connector } = require("./databaseUtil");
1+
const { connector } = require("../databaseUtil");
22

3-
const StudentCollegeSchema = {
4-
userId: {
3+
const studentCollegeSchema = {
4+
uid: {
55
type: String,
66
required: true,
77
unique: true,
88
},
9-
AdmissionYear: {
9+
admission_year: {
1010
type: String,
1111
required: true,
1212
},
13-
StudentCode: {
13+
student_code: {
1414
type: String,
1515
},
16-
Rollno: {
16+
roll_no: {
1717
type: String,
1818
},
19-
AdmissionStatus: {
19+
admission_status: {
2020
type: String,
2121
required: true,
2222
},
23-
AdmissionPattern: {
23+
admission_pattern: {
2424
type: String,
2525
},
26-
Admissioncategory: {
26+
admission_category: {
2727
type: String,
2828
required: true,
2929
},
30-
SeatDesc: {
30+
seat_desc: {
3131
type: String,
3232
},
33-
QuotaType: {
33+
quota_type: {
3434
type: String,
3535
required: true,
3636
},
37-
QuotaType: {
38-
type: String,
39-
required: true,
40-
},
41-
Boarder: {
37+
is_boarder_student: {
4238
type: Boolean,
4339
},
44-
Seattype: {
40+
seat_type: {
4541
type: String,
4642
required: true,
4743
},
48-
Seatsubtype: {
44+
seat_sub_type: {
4945
type: String,
5046
required: true,
5147
},
52-
EligibilityNo: {
48+
eligibility_no: {
5349
type: String,
5450
required: true,
5551
},
56-
EnrollmentNo: {
52+
enrollment_no: {
5753
type: String,
5854
required: true,
5955
unique: true,
6056
},
6157
};
6258

63-
const studentcollegeCollege = new connector.model(
64-
"StudentCollegeSchema",
59+
const studenCollege = new connector.model(
60+
"Student college",
6561
StudentCollegeSchema
6662
);
6763

models/std_edu_history.js renamed to models/student/std_edu_history.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
const { Schema, default: mongoose } = require('mongoose');
2-
const {connector} = require('./databaseUtil');
1+
const {connector} = require('../databaseUtil');
32

4-
const studentEducationSchema = new Schema({
5-
personal_info: {
6-
name: { type: String, required: true },
7-
emailId: { type: String, unique: true, required: true },
8-
gender: { type: String, required: true },
9-
password: { type: String, required: true },
10-
},
3+
const studentEducationSchema = {
4+
uid: {type: String, require: true},
115
//tenth_details
126
tenth: {
137
marks: { type: String, required: true },
@@ -59,6 +53,6 @@ const studentEducationSchema = new Schema({
5953
scholarship_number:{type:String,required:false},
6054
last_school_college_attended:{type:String,required:true},
6155
}
62-
})
63-
const studentEducation = new connector.model('std-edu',studentEducationSchema);
56+
}
57+
const studentEducation = new connector.model('Student education',studentEducationSchema);
6458
module.exports={};

0 commit comments

Comments
 (0)