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


module.exports = {
    tableName: 'enseignants_classe',

    attributes: {
        /* id: {
         type: 'number',
         //columnName: 'id',
         unique: true,
         autoIncrement: true,
         primaryKey: true,
         //required: true,
         columnType: 'integer',
     },*/
        codeEnseignant: {
            type: 'string',
            columnName: 'code_enseignant',
            required: true,
        },
        pp: {
            type: 'number',
            //defaultsTo: false,
            columnName: 'pp', // 1 NON 2 OUI
            allowNull: true
            // required: true,
        },
        codeClasse: {
            type: 'string',
            columnName: 'code_classe',
            allowNull: true
        },
        codeMatiere: {
            type: 'string',
            columnName: 'code_matiere',
            allowNull: true
        },
        anneeScolaire: {
            type: 'string',
            columnName: 'annee_scolaire',
            required: true,
            //columnType: 'bigint'
        },
        codeEcole: {
            type: 'string',
            columnName: 'code_ecole',
            required: true,
        },
    },

};

