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


module.exports = {
    tableName: 'parent',

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

        },
        nom: {
            type: 'string',
            columnName: 'nom',
            required: true,

        }, 

        prenom: {
            type: 'string',
            columnName: 'prenom',
            allowNull: true

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

        },
        dateNaissance: {
            type: 'ref',
            //type: 'string',
            columnName: 'date_naissance',
            //columnType:'datetime',
            //allowNull: true
        },

        lieuNaissance: {
            type: 'string',
            columnName: 'lieu_naissance',
            allowNull: true
        },
        indicatif1: {
            type: 'string',
            columnName: 'indicatif1',
            allowNull: true,
            //columnType: 'bigint'

        },

        telephone1: {
            type: 'string',
            columnName: 'telephone1',
            allowNull: true,
            //columnType: 'bigint'
        },
        indicatif2: {
            type: 'string',
            columnName: 'indicatif2',
            allowNull: true,
            //5columnType: 'bigint'

        },

        telephone2: {
            type: 'string',
            columnName: 'telephone2',
            allowNull: true,
           //5 columnType: 'bigint'
        },
        email: {
            type: 'string',
            columnName: 'email',
            allowNull: true,
        },

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

};

