Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.91 KB | None | 0 0
  1. {
  2.             bsonType: "object",
  3.             required: ["_id", "linkId", "body", "score","isRemoved"],
  4.             comment: {
  5.                 _id: {
  6.                     bsonType: "objectId",
  7.                     description: "must be an objectId and is required"
  8.                 },
  9.                 linkId: {
  10.                     bsonType: "objectId",
  11.                     description: "must be an objectId and is required"
  12.                 },
  13.                 body{
  14.                     bsonType: "string",
  15.                     description: "must be a string and is required"
  16.                 },
  17.                 score{
  18.                     bsonType: "int",
  19.                     description: "must be an int and is required"
  20.                 },
  21.                 isRemoved{
  22.                     bsonType: "boolean",
  23.                     description: "must be an boolean and is required"
  24.                 }
  25.             },
  26.             user: {
  27.                 _id: {
  28.                     bsonType: "objectId",
  29.                     description: "must be an objectId and is required"
  30.                 },
  31.                 firstName: {
  32.                     bsonType: "string",
  33.                     description: "must be an string and is required"
  34.                 },
  35.                 lastName: {
  36.                     bsonType: "string",
  37.                     description: "must be an string and is required"
  38.                 },
  39.                 password: {
  40.                     bsonType: "string",
  41.                     description: "must be an string and is required"
  42.                 },
  43.                 activationToken: {
  44.                     bsonType: "string",
  45.                     description: "must be an string and is not required"
  46.                 },
  47.                 resetPasswordToken: {
  48.                     bsonType: "string",
  49.                     description: "must be an string and is not required"
  50.                 },
  51.                 linkSearchHistory: [
  52.                     link:{
  53.                         bsonType: "object",
  54.                         description: "must be an object and is optional",
  55.                         required: ["linkId", "searchDate, "minScore","ammount"],
  56.                        properties: {
  57.                                linkId:{
  58.                                    bsonType: "objectId",
  59.                                    description: "must be an objectId and is required"
  60.                                },
  61.                                searchDate:{
  62.                                    bsonType: "date",
  63.                                    description: "must be an objectId and is required"
  64.                                },
  65.                                threadTitle:{
  66.                                    bsonType: "string",
  67.                                    description: "must be an objectId and is not required"
  68.                                },
  69.                                minScore:{
  70.                                    bsonType: "int",
  71.                                    description: "must be an objectId and is required"
  72.                                },
  73.                                ammount:{
  74.                                    bsonType: "int",
  75.                                    description: "must be an objectId and is required"
  76.                                }
  77.                        }
  78.                    }
  79.                ]
  80.            },
  81.            sessions: {
  82.                _id: {
  83.                    bsonType: "objectId",
  84.                    description: "must be an objectId and is required"
  85.                },
  86.                session_id: {
  87.                    bsonType: "string",
  88.                    description: "must be an string and is required"
  89.                },
  90.                session_attributes{
  91.                    bsonType: "string",
  92.                    description: "must be an string and is required"
  93.                }
  94.            }
  95.        }
  96.    }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement