<?php
// WIKI: http://wiki.mtcmedia.co.uk/index.php?title=Module_Builder_1

define('MODEL_TABLE_CREATION_MODE', true); // enable/disable mode where columns defined in $model_form affect the table. // REMOVE THIS ONE TABLE IS DONE!!!!!!

define('MODEL_TABLE_NAME', '{{{TABLE_NAME}}}'); // required
define('MODEL_CLASS_NAMESPACE_PREFIX', '{{{NAMESPACE_PREFIX}}}'); // required
define('MODEL_CLASS_NAME', '{{{CLASS_NAME}}}'); // required
define('MODEL_FOLDER', '{{{FOLDER_NAME}}}'); // must be relevant namespace bit for autoloader to find stuff

define('MODEL_SINGULAR', '{{{MODULE_NAME_SINGULAR}}}'); // lowercase
define('MODEL_PLURAL', '{{{MODULE_NAME_PLURAL}}}'); // lowercase

define('MODEL_MODULE_DESCRIPTION', ''); // lowercase

// "anywhere" for `name` LIKE '%TERM%' or "beginning" `name` LIKE 'TERM%'
define('MODULE_QUICK_SEARCH_MATCH_MODE', 'anywhere');

$model_manage_limit_rows_per_page = array(10,20,50,0); // 0 is no limit, first one is the default

// To allow or not allow the client to add new of this
// Currently only makes 'Add' button hidden
if (DEV_MODE) {
    define('MODEL_ALLOW_NEW', true); // for dev
} else {
    define('MODEL_ALLOW_NEW', true);
}

$module = [];
$module['list_order'] = [['order','desc'], ['id', 'desc']]; // lowercase all

define('MODEL_NAME_ATTRIBUTE', 'name'); // 'name'; 'title'; 'name surname'

// The setup to generate the manage.php list
$model_list_columns = array(
    'name' => array(),
    'edit' => array(
        'type' => 'action'
    ),
    'delete' => array(
        'type' => 'action'
    )
);

// Form setup and data validation options for edit.php
$model_form = array(
    'name' => array(
        'label' => 'Name',
        'rules' => array(
            'required' => true,
            'notEmpty' => true,
        ),
    ),
);

// Related models that should appear in the top tab when editing existing model
// and have their own edit and manage pages within this module.
$module['relations'] = [];

// Advanced filter options. If this is filled - the quicksearch is turned off
$module['advanced_filter'] = [];
