<?php

namespace modules\formEdit;


class module_info extends \module {

	function __info() {  
		return [
			'version' => '2026.6.1',
			'required' => TRUE,
			'class' => 'modules\\formEdit\\main',
			'name' => 'Generate HTML Forms',
			'depends' => ['input', 'output', 'tabs'],	// cannot include `database`
			
			'database' =>  [
				'form_response' => [
					'engine' => 'auto',
					'charset' => 'utf-8',
					'fields' => [
                        [
                            'name' => 'fr_id',
                            'type' => 'int',
                            'size' => 11,
                            'null' => FALSE,
							'autoinc' => TRUE,
							'unsigned' => TRUE,
                        ],[
                            'name' => 'fr_formid',
                            'type' => 'string',
                            'size' => 8,
                            'null' => FALSE,
                        ],[
                            'name' => 'fr_timestamp',
                            'type' => 'int',
                            'size' => 11,
                        ],[
                            'name' => 'fr_data',
                            'type' => 'text',
                        ],[
                            'name' => 'fr_ip',
                            'type' => 'string',
                            'size' => 45,
                            'null' => TRUE,
                        ],[
                            'name' => 'fr_country',
                            'type' => 'string',
                            'size' => 2,
                            'null' => TRUE,
                        ],[
                            'name' => 'fr_score',
                            'type' => 'float',
                            'null' => TRUE,
                        ],[
                            'name' => 'fr_lang',
                            'type' => 'string',
                            'size' => 6,
                            'null' => TRUE,
						]
                    ],
					'index' => [
						'PRIMARY' => [	
							'type' => 'primary',
							'fields' => ['fr_id'],
						],
						'byForm' => [	
							'type' => 'index',
							'fields' => ['fr_formid', 'fr_timestamp'],
						],
						'byDate' => [	
							'type' => 'index',
							'fields' => ['fr_timestamp', 'fr_formid'],
						],
					],
				],
            ],
			
		];
	}

}
