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


module.exports = {
    tableName: 'abscence_presence_details',

    attributes: {
       /* id: {
        type: 'number',
        //columnName: 'id',
        unique: true,
        autoIncrement: true,
        primaryKey: true,
        //required: true,
        columnType: 'integer',
    },*/
        codeAbscence: {
            type: 'string',
            columnName: 'code_abscence',
            required: true,

        },
        
        matricule: {
            type: 'string',
            columnName: 'matricule',
            //allowNull: true,
            required: true,
        },
       
        abscent: {
            type: 'boolean',
            columnName: 'abscent',
            defaultsTo: false,
        },
        motif: {
            type: 'string',
            columnName: 'motif',
            //columnType:'datetime',
            //allowNull: true

        },
       
        retard: {
            type: 'boolean',
            columnName: 'retard',
            //allowNull: true,
            defaultsTo: false,


        },
        heureRetard: {
            type: 'string',
            columnName: 'heureRetard',
            allowNull: true

        },
        motifRetard: {
            type: 'string',
            columnName: 'motifRetard',
            allowNull: true

        },
        depart: {
            type: 'boolean',
            columnName: 'depart',
            //allowNull: true,
            defaultsTo: false,


        },
        heureDepart: {
            type: 'string',
            columnName: 'heureDepart',
            allowNull: true

        },
        motifDepart: {
            type: 'string',
            columnName: 'motifDepart',
            allowNull: true

        },
        observation: {
            type: 'string',
            columnName: 'observation',
            allowNull: true

        },
        
        codeEcole: {
            type: 'string',
            columnName: 'code_ecole',
            required: true,

        }, 
        anneeScolaire: {
            type: 'string',
            columnName: 'anneeScolaire',
            required: true,
            //columnType: 'bigint'


        },

      
    },

};

