/**
 * Role.js
 *
 * @description :: A model definition represents a database table/collection.
 * @docs        :: https://sailsjs.com/docs/concepts/models-and-orm/models
 */


module.exports = {
    tableName: 'prim_moyenne',

    attributes: {
        /* id: {
        type: 'number',
        //columnName: 'id',
        unique: true,
        autoIncrement: true,
        primaryKey: true,
        //required: true,
        columnType: 'integer',
    },*/
        CodNote: {
            type: 'string',
            columnName: 'code_note',
            required: true,
        },
        codeEcole: {
            type: 'string',
            columnName: 'code_ecole',
            required: true,

        },

        date: {
            type: 'string',
            columnName: 'date',
            required: true,

        },
       
       /* annee: {
            type: 'string',
            columnName: 'annee',
            allowNull: true,
        },*/
        codEleve: {
            type: 'string',
            columnName: 'cod_elv',
            allowNull: true,
        },
        rang: {
            type: 'string',
            columnName: 'rang',
            allowNull: true,
        },
        idEvaluation: {
            type: 'string',
            columnName: 'id_evaluation',
            allowNull: true,
        },
        idSall: {
            type: 'string',
            columnName: 'id_sall',
            allowNull: true,
        },
        totMinimal: {
            type: 'string',
            columnName: 'tot_minimal',
            allowNull: true,
        },
        totMaximal: {
            type: 'string',
            columnName: 'tot_maximal',
            allowNull: true,
        },
        totMoyenne: {
            type: 'string',
            columnName: 'tot_moyenne',
            allowNull: true,
        },
        moyenneEval: {
            type: 'string',
            columnName: 'moyenne_eval',
            allowNull: true,
        },
        seuilReussite: {
            type: 'boolean',
            columnName: 'seuil_reussite',
            allowNull: true,
        },
        codElvIdeval: {
            type: 'string',
            columnName: 'cod_elv_ideval',
            allowNull: true,
        },
        anneeScolaire: {
            type: 'string',
            columnName: 'annee_scolaire',
            required: true,
        },
    },

};

