<commit_before><commit_msg>Added db scheme file<commit_after>/*
Written by: <NAME>
If any problems, please install and add mongoose to package.json file
*/

var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var User = new Schema({
  genfors: Schema.Types.ObjectId,
  name: String,
  password_hash: String,
  onlineweb_id: Number,
  registerd: Date,
  can_vote: Boolean
});

var Answer = new Schema({
  question: Schema.Types.ObjectId,
  option: Number,
  name: String,
  user: Schema.Types.ObjectId
});

var Vote_demand = new Schema({
  title: String,
  percent: Number
});

var Question = new Schema({
  genfors: Schema.Types.ObjectId,
  title:  String,
  description: String,
  active: Boolean,
  deleted: Boolean,
  options: [{description: String, id: Number, blank: Boolean}],
  secret: Boolean,
  show_only_winner: Boolean,
  counting_blank_votes: Boolean,
  vote_demand: Schema.Types.ObjectId
});


var Genfors = new Schema({
  title: String,
  date: Date,
  staus: Boolean, //Open/Closed?
  pin: Number,
});
{'fraction_non_alphanumeric': 0.12124151309408342, 'fraction_numerical': 0.0, 'mean_word_length': 4.375, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5169521', 'n_tokens_mistral': 345, 'n_tokens_neox': 341, 'n_words': 102}