protected function column($name, $type, array $options = [])
    {
        static::addColumn($name, $type, isset($options['map']) ? $options['map'] : $name);

        static::$metaDatasClass[static::class][MetaData::MODELS_NON_PRIMARY_KEY][] = $name;

        if (isset($options['nullable']) && $options['nullable']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_EMPTY_STRING_VALUES][$name] = true;
        } else {
            static::$metaDatasClass[static::class][MetaData::MODELS_NOT_NULL][] = $name;
        }

        if (isset($options['default'])) {
            static::$metaDatasClass[static::class][MetaData::MODELS_DEFAULT_VALUES][$name] = $options['default'];
        }

        if (isset($options['autoInsert']) && $options['autoInsert']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_AUTOMATIC_DEFAULT_INSERT][$name] = true;
        }

        if (isset($options['autoUpdate']) && $options['autoUpdate']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_AUTOMATIC_DEFAULT_UPDATE][$name] = true;
        }
    }
protected function column($name, $type, array $options = [])
    {
        static::addColumn($name, $type, isset($options['map']) ? $options['map'] : $name);

        static::$metaDatasClass[static::class][MetaData::MODELS_NON_PRIMARY_KEY][] = $name;

        if (isset($options['nullable']) && $options['nullable']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_EMPTY_STRING_VALUES][$name] = true;
        } else {
            static::$metaDatasClass[static::class][MetaData::MODELS_NOT_NULL][] = $name;
        }

        if (isset($options['default'])) {
            static::$metaDatasClass[static::class][MetaData::MODELS_DEFAULT_VALUES][$name] = $options['default'];
        }

        if (isset($options['autoInsert']) && $options['autoInsert']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_AUTOMATIC_DEFAULT_INSERT][$name] = true;
        }

        if (isset($options['autoUpdate']) && $options['autoUpdate']) {
            static::$metaDatasClass[static::class][MetaData::MODELS_AUTOMATIC_DEFAULT_UPDATE][$name] = true;
        }
    }
protected function column ( $ name , $ type , array $ options = [ ] ) { static :: addColumn ( $ name , $ type , isset ( $ options [ 'map' ] ) ? $ options [ 'map' ] : $ name ) ; static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_NON_PRIMARY_KEY ] [ ] = $ name ; if ( isset ( $ options [ 'nullable' ] ) && $ options [ 'nullable' ] ) { static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_EMPTY_STRING_VALUES ] [ $ name ] = true ; } else { static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_NOT_NULL ] [ ] = $ name ; } if ( isset ( $ options [ 'default' ] ) ) { static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_DEFAULT_VALUES ] [ $ name ] = $ options [ 'default' ] ; } if ( isset ( $ options [ 'autoInsert' ] ) && $ options [ 'autoInsert' ] ) { static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_AUTOMATIC_DEFAULT_INSERT ] [ $ name ] = true ; } if ( isset ( $ options [ 'autoUpdate' ] ) && $ options [ 'autoUpdate' ] ) { static :: $ metaDatasClass [ static :: class ] [ MetaData :: MODELS_AUTOMATIC_DEFAULT_UPDATE ] [ $ name ] = true ; } }
Define a column

@param string $name
@param int    $type
@param array  $options
Define a column