Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: "airbnb-base",
overrides: [],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"linebreak-style": 0,
"no-console": 0,
semi: ["error", "always"],
quotes: ["error", "double"],
},
};
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"tabWidth": 2
}
8 changes: 4 additions & 4 deletions models/emp_bankSchema.js → models/employee/emp_bank.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { connector } = require("./databaseUtil");
const { connector } = require("../databaseUtil");

const EmpBankSchema = {
userId: {
const employeeBankSchema = {
uid: {
type: String,
required: true,
unique: true,
Expand Down Expand Up @@ -37,5 +37,5 @@ const EmpBankSchema = {
},
};

const Bank = new connector.model("EmpBank", EmpBankSchema);
const empBank = new connector.model("Employee bank", employeeBankSchema);
module.exports = {};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { connector } = require("./databaseUtil");
const { connector } = require("../databaseUtil");

const employeeCurrentEmployementSchema = {
uid: {type: String, require: true},
date_of_joining: { type: Date, required: true },
department_name: { type: String, required: true },
designation: { type: String, required: true },
Expand All @@ -10,7 +11,7 @@ const employeeCurrentEmployementSchema = {
};

const employeeCurrentEmployement = new connector.model(
"empCurrentDetails",
"Employee current Employement",
employeeCurrentEmployementSchema
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Education = {
passing_year: { type: String, required: true },
}
const employeeEducationHistorySchema = {
uid: {type: String, require: true},
ssc: { type: Education, required: true },
hsc: { type: Education, required: true },
dip: { type: Education },
Expand All @@ -26,4 +27,4 @@ const employeeEducationHistorySchema = {
phd: { type: Education },
pdoc: { type: Education }
}
const employeeEducationHistory = new connector.model('emp-edu-history',employeeEducationHistorySchema);
const employeeEducationHistory = new connector.model('Employee education history',employeeEducationHistorySchema);
5 changes: 3 additions & 2 deletions models/emp_personal.js → models/employee/emp_personal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { connector } from './databaseUtil';

const empPersonalSchema = {
const employeePersonalSchema = {
uid: {type: String, require:true},
title: { type: String, required: true },
empFirstName: { type: String, required: true },
empMiddleName: { type: String, required: true },
Expand Down Expand Up @@ -60,6 +61,6 @@ const empPersonalSchema = {
previousLastName: { type: String },
};

const empPersonal = new connector.model('Employee_Personal', empPersonalSchema);
const empPersonal = new connector.model('Employee personal', employeePersonalSchema);

module.exports = {};
13 changes: 0 additions & 13 deletions models/std_med_history.js

This file was deleted.

6 changes: 3 additions & 3 deletions models/std_bankSchema.js → models/student/std_bank.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { connector } = require("./databaseUtil");

const stdBankSchema = {
userId: {
const studentBankSchema = {
uid: {
type: String,
required: true,
unique: true,
Expand Down Expand Up @@ -34,5 +34,5 @@ const stdBankSchema = {
},
};

const std_bank = new connector.model("stdBankSchema", stdBankSchema);
const stdBank = new connector.model("Student bank", studentBankSchema);
module.exports = {};
40 changes: 18 additions & 22 deletions models/std_college.js → models/student/std_college.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,63 @@
const { connector } = require("./databaseUtil");
const { connector } = require("../databaseUtil");

const StudentCollegeSchema = {
userId: {
const studentCollegeSchema = {
uid: {
type: String,
required: true,
unique: true,
},
AdmissionYear: {
admission_year: {
type: String,
required: true,
},
StudentCode: {
student_code: {
type: String,
},
Rollno: {
roll_no: {
type: String,
},
AdmissionStatus: {
admission_status: {
type: String,
required: true,
},
AdmissionPattern: {
admission_pattern: {
type: String,
},
Admissioncategory: {
admission_category: {
type: String,
required: true,
},
SeatDesc: {
seat_desc: {
type: String,
},
QuotaType: {
quota_type: {
type: String,
required: true,
},
QuotaType: {
type: String,
required: true,
},
Boarder: {
is_boarder_student: {
type: Boolean,
},
Seattype: {
seat_type: {
type: String,
required: true,
},
Seatsubtype: {
seat_sub_type: {
type: String,
required: true,
},
EligibilityNo: {
eligibility_no: {
type: String,
required: true,
},
EnrollmentNo: {
enrollment_no: {
type: String,
required: true,
unique: true,
},
};

const studentcollegeCollege = new connector.model(
"StudentCollegeSchema",
const studenCollege = new connector.model(
"Student college",
StudentCollegeSchema
);

Expand Down
16 changes: 5 additions & 11 deletions models/std_edu_history.js → models/student/std_edu_history.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
const { Schema, default: mongoose } = require('mongoose');
const {connector} = require('./databaseUtil');
const {connector} = require('../databaseUtil');

const studentEducationSchema = new Schema({
personal_info: {
name: { type: String, required: true },
emailId: { type: String, unique: true, required: true },
gender: { type: String, required: true },
password: { type: String, required: true },
},
const studentEducationSchema = {
uid: {type: String, require: true},
//tenth_details
tenth: {
marks: { type: String, required: true },
Expand Down Expand Up @@ -59,6 +53,6 @@ const studentEducationSchema = new Schema({
scholarship_number:{type:String,required:false},
last_school_college_attended:{type:String,required:true},
}
})
const studentEducation = new connector.model('std-edu',studentEducationSchema);
}
const studentEducation = new connector.model('Student education',studentEducationSchema);
module.exports={};
13 changes: 13 additions & 0 deletions models/student/std_med_history.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { connector } from './databaseUtil';

const studentMedicalSchema={
uid: {type: String, require: true},
blood_group:{type:String, required:true},
past_medical_history:{type:String, required:true},
immunisation_history:{type:String, required:true},
chronic_medical_conditions:{type:String},
parents_emailId:{type:String, required:true},
parents_contact:{type:Number, required:true},
relative_contacts:{type:Number, required:true},
}
const medicalHistory=new connector.model('Student medical',studentMedicalSchema);
5 changes: 3 additions & 2 deletions models/std_personal.js → models/student/std_personal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { connector } from './databaseUtil';

const stdPersonalSchema = {
const studentPersonalSchema = {
uid: {type: String, require: true},
title:{type: String, required: true},
firstName:{type: String, required: true},
middleName:{type: String, required: true},
Expand Down Expand Up @@ -80,4 +81,4 @@ const stdPersonalSchema = {
noOfDocumentsUploaded:{type: Number, required: true},
};

const stdPersonal = new connector.model('Student_Personal', stdPersonalSchema);
const stdPersonal = new connector.model('Student personal', studentPersonalSchema);
Loading