<commit_before>/*
** Module dependencies
*/
var mongoose = require('mongoose');

var Schema = mongoose.Schema;

var ressourceTypes = [
    'revenusSalarie',
    'revenusNonSalarie',
    'revenusAutoEntrepreneur',
    'revenusStage',
    'allocationsChomage',
    'allocationLogement',
    'rsa',
    'aspa',
    'ass',
    'aah',
    'pensionsInvalidite',
    'indJourMaternite',
    'indJourMaladie',
    'indJourMaladieProf',
    'indJourAccidentDuTravail',
    'indChomagePartiel',
    'pensionsAlimentaires',
    'pensionsRetraitesRentes',
    'bourseEnseignementSup',
    'revenusLocatifs'
];

var RessourceSchema = new Schema({
    periode: { type: String, required: true },
    type: { type: String, required: true, enum: ressourceTypes },
    montant: { type: Number, required: true }
});

var SituationPro = new Schema({
    situation: { type: String, enum: ['sans_activite', 'salarie', 'auto_entrepreneur', 'apprenti', 'travailleur_saisonnier', 'stagiaire', 'independant','gerant_salarie', 'demandeur_emploi', 'etudiant', 'retraite'] },
    since: String,
    volontairementSansActivite: Boolean,
    contractType: { type: String, enum: ['cdi', 'cdd', 'interim'] },
    isRemunere: Boolean,
    gerantSalarieAffiliation: String,
    isIndemnise: Boolean,
    indemniseSince: String
});

var IndividuDef = {
    civilite: { type: String, enum: ['f', 'h'] },
    firstName: String,
    lastName: String,
    nomUsage: String,
    nir: String,
    enceinte: Boolean,
    boursierEnseignementSup: Boolean,
    etudiant: Boolean,
    demandeurEmploi: Boolean,
    retraite: Boolean,
    statutMarital: { type: String, enum: ['mariage', 'pacs', 'relation_libre', 'celibataire', 'separe', 'divorce', 'veuf', 'pacs_rompu', 'concubinage_rompu'] },
    dateSituationFamiliale: Date,
    dateDeNaissance: Date,
    villeNaissance: String,<commit_msg>ajout champs debutPeriode et finPeriode dans le schéma des ressources<commit_after>/*
** Module dependencies
*/
var mongoose = require('mongoose');

var Schema = mongoose.Schema;

var ressourceTypes = [
    'revenusSalarie',
    'revenusNonSalarie',
    'revenusAutoEntrepreneur',
    'revenusStage',
    'allocationsChomage',
    'allocationLogement',
    'rsa',
    'aspa',
    'ass',
    'aah',
    'pensionsInvalidite',
    'indJourMaternite',
    'indJourMaladie',
    'indJourMaladieProf',
    'indJourAccidentDuTravail',
    'indChomagePartiel',
    'pensionsAlimentaires',
    'pensionsRetraitesRentes',
    'bourseEnseignementSup',
    'revenusLocatifs'
];

var RessourceSchema = new Schema({
    periode: { type: String, required: false },
    debutPeriode: { type: String, required: false },
    finPeriode: { type: String, required: false },
    type: { type: String, required: true, enum: ressourceTypes },
    montant: { type: Number, required: true }
});

var SituationPro = new Schema({
    situation: { type: String, enum: ['sans_activite', 'salarie', 'auto_entrepreneur', 'apprenti', 'travailleur_saisonnier', 'stagiaire', 'independant','gerant_salarie', 'demandeur_emploi', 'etudiant', 'retraite'] },
    since: String,
    volontairementSansActivite: Boolean,
    contractType: { type: String, enum: ['cdi', 'cdd', 'interim'] },
    isRemunere: Boolean,
    gerantSalarieAffiliation: String,
    isIndemnise: Boolean,
    indemniseSince: String
});

var IndividuDef = {
    civilite: { type: String, enum: ['f', 'h'] },
    firstName: String,
    lastName: String,
    nomUsage: String,
    nir: String,
    enceinte: Boolean,
    boursierEnseignementSup: Boolean,
    etudiant: Boolean,
    demandeurEmploi: Boolean,
    retraite: Boolean,
    statutMarital: { type: String, enum: ['mariage', 'pacs', 'relation_libre', 'celibataire', 'separe', 'divorce', 'veuf', 'pacs_rompu', 'concubinage_rompu'] },
    dateSituationFamiliale: Date,
    dateDeNaissance: Date,
    villeNaissance: String,
{'fraction_non_alphanumeric': 0.137859549105986, 'fraction_numerical': 0.0, 'mean_word_length': 4.302197802197802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '479060', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1359, 'n_words': 286}