Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let UserSchema = new Schema({
  2.     username: {
  3.         type: String,
  4.         unique: true,
  5.         required: true
  6.     },
  7.     mail:{
  8.         type: String,
  9.         unique: true,
  10.         required: true
  11.     },
  12.     informations:{
  13.         name:{
  14.             type: String
  15.         },
  16.         surname: {
  17.             type: String
  18.         },
  19.         password: {
  20.             type: String,
  21.             required: true
  22.         },
  23.         social:{
  24.             discord: {
  25.                 type: String
  26.             },
  27.             youtube: {
  28.                 type: String
  29.             },
  30.             twitter: {
  31.                 type: String
  32.             },
  33.         }
  34.     },
  35.     account:{
  36.         activation_code:{
  37.             type: String
  38.         },
  39.         activated: {
  40.             type: Boolean,
  41.             default: false
  42.         }
  43.     },
  44.     profil:{
  45.         picture: {
  46.             type: String
  47.         },
  48.         description: {
  49.             type: String
  50.         },
  51.         comments: [
  52.             {
  53.                 date: {
  54.                     type: Date,
  55.                     default: Date.now
  56.                 },
  57.                 content: {
  58.                     type: String
  59.                 },
  60.                 note: {
  61.                     type: Number
  62.                 }
  63.             }
  64.         ],
  65.         karma:{
  66.             noteMoyenne: {
  67.                 type: Number,
  68.             },
  69.             notes: [Number]
  70.         }
  71.     }
  72.  
  73. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement