Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const User = {
- email:String,
- password: String,
- picture: String,
- profile: {
- name: String,
- job: String,
- company: String,
- },
- history:[{
- projectName:String,
- date: Date,
- paid: Number //ไป้ข
- }],
- }
- const bcrypt = User.pre('save', (password) => {
- //compare password
- })
- const getAvatar = User.pre('save',(picture)=>{
- //getAvatar
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement