박권수

Merge branch 'server' into web

...@@ -17,6 +17,7 @@ const BottleMedicineSchema = new Schema({ ...@@ -17,6 +17,7 @@ const BottleMedicineSchema = new Schema({
17 type : String, 17 type : String,
18 ref : 'User', 18 ref : 'User',
19 required : true, 19 required : true,
20 + lowercase : true,
20 }, 21 },
21 dosage : { 22 dosage : {
22 type : Number, 23 type : Number,
......
...@@ -3,7 +3,7 @@ const mongoose = require('mongoose'); ...@@ -3,7 +3,7 @@ const mongoose = require('mongoose');
3 const Schema = mongoose.Schema; 3 const Schema = mongoose.Schema;
4 4
5 const DoctorInfoSchema = new Schema({ 5 const DoctorInfoSchema = new Schema({
6 - doctorId : { type : String, required : true, }, 6 + doctorId : { type : String, required : true, lowercase : true, },
7 info : { 7 info : {
8 doctorLicense : { type : String, required : true, }, 8 doctorLicense : { type : String, required : true, },
9 validateDoctorLicense : { type : String, default : null }, 9 validateDoctorLicense : { type : String, default : null },
......
...@@ -10,7 +10,7 @@ const FeedbackSchema = new Schema({ ...@@ -10,7 +10,7 @@ const FeedbackSchema = new Schema({
10 required : true, 10 required : true,
11 ref : 'BottleMedicine', 11 ref : 'BottleMedicine',
12 }, 12 },
13 - doctorId : { type : String, required : true, ref : 'User', }, 13 + doctorId : { type : String, required : true, ref : 'User', lowercase : true, },
14 feedback : { type : String, required : true, }, 14 feedback : { type : String, required : true, },
15 }); 15 });
16 16
......
...@@ -5,7 +5,7 @@ const Schema = mongoose.Schema; ...@@ -5,7 +5,7 @@ const Schema = mongoose.Schema;
5 const HubSchema = new Schema ({ 5 const HubSchema = new Schema ({
6 hubId : { type : Number, required : true, unique : true }, 6 hubId : { type : Number, required : true, unique : true },
7 hosting : { type : Object, default : null }, 7 hosting : { type : Object, default : null },
8 - userId : { type : String, default : null, ref : 'User' }, 8 + userId : { type : String, default : null, ref : 'User', lowercase : true, },
9 }); 9 });
10 10
11 HubSchema.statics.findByHubId = function(hubId) { 11 HubSchema.statics.findByHubId = function(hubId) {
......
...@@ -5,8 +5,8 @@ require('moment-timezone'); ...@@ -5,8 +5,8 @@ require('moment-timezone');
5 const Schema = mongoose.Schema; 5 const Schema = mongoose.Schema;
6 6
7 const PatientInfoSchema = new Schema({ 7 const PatientInfoSchema = new Schema({
8 - patientId : { type : String, required : true, ref : 'User', }, 8 + patientId : { type : String, required : true, ref : 'User', lowercase : true, },
9 - doctorId : { type : String, required : true, ref : 'User', }, 9 + doctorId : { type : String, required : true, ref : 'User', lowercase : true, },
10 info : { type : String, required : true, }, 10 info : { type : String, required : true, },
11 useYn : { type : String, required : true, default : 'W', }, 11 useYn : { type : String, required : true, default : 'W', },
12 }); 12 });
......
...@@ -3,7 +3,7 @@ const mongoose = require('mongoose'); ...@@ -3,7 +3,7 @@ const mongoose = require('mongoose');
3 const Schema = mongoose.Schema; 3 const Schema = mongoose.Schema;
4 4
5 const ProfileSchema = new Schema({ 5 const ProfileSchema = new Schema({
6 - userId : { type : String, required : true, ref : 'User', }, 6 + userId : { type : String, required : true, ref : 'User', lowercase : true, },
7 userNm : { type : String, required : true, }, 7 userNm : { type : String, required : true, },
8 birth : { type : String, required : true, }, 8 birth : { type : String, required : true, },
9 contact : { type : String, required : true, }, 9 contact : { type : String, required : true, },
......