Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const User = new Schema({
- name: String,
- surname: String,
- avatar:{ type: String, default: '/images/avatars/no-avatar_jpg.jpg' },
- email: String,
- tel: String,
- skype: String,
- password: String,
- tasks: [{type: Schema.Types.ObjectId, ref: 'Task'}],
- projects: [{type: Schema.Types.ObjectId, ref: 'Project'}]
- });
- const Project = new Schema({
- owner_id: {type: Schema.Types.ObjectId, ref: 'User'},
- name: String,
- cover: {type: String, default: '/images/dc.png'},
- dateOfcreation: {type: Date, default: Date.now},
- description: String,
- tasks: [{type: Schema.Types.ObjectId, ref: 'Task'}],
- users: [{type: Schema.Types.ObjectId, ref: 'User'}]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement