May 2018
Intermediate to advanced
470 pages
13h 54m
English
The Shop schema defined in server/models/shop.model.js will have simple fields to store shop details, along with a logo image, and a reference to the user who owns the shop.
name: { type: String, trim: true, required: 'Name is required' },description: { type: String, trim: true },
image: { data: Buffer, contentType: String },
owner: { type: mongoose.Schema.ObjectId, ref: 'User'}
Read now
Unlock full access