Created
October 10, 2019 15:37
-
-
Save ramazankanbur/553818238e170322167bd6f11e13d0b7 to your computer and use it in GitHub Desktop.
sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
const userSchema = new Schema({ | |
name: { | |
type: String, | |
required: [true, 'isim alanı zorunlu alan'] | |
}, | |
password: { | |
type: String, | |
required: [true, 'şifre alanı zorunlu alan'] | |
}, | |
isAdmin: { | |
type: Boolean, | |
default: false | |
}, | |
userImagePath:{ | |
type:String | |
}, | |
userImage:{ | |
data:Buffer, | |
contentType:String | |
}, | |
isDelete:{ | |
type:Boolean, | |
default:false | |
} | |
}); | |
const UserModel = mongoose.model('user', userSchema); | |
module.exports = UserModel; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment