<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Testimonials extends AdminGodController {
	protected $model = 'TestimonialModel';
	protected $names = [
		'singular' => 'Depoimento',
		'plural' => 'Depoimentos',
		'link' => 'testimonials',
	];
	protected $uploadFolder = 'testimonials';
	protected $permissions = [
		'create' => true,
		'update' => true,
		'delete' => true
	];

	protected $fields = [
		[
			'name' => 'id',
			'label' => 'Id',
			'type' => 'hidden',
			'showOnTable' => false,
			'rules' => 'trim',
		],
		[
			'name' => 'message',
			'label' => 'Mensagem',
			'type' => 'textarea',
			'rules' => 'trim|required',
			'required' => true,
			'col' => 'col-md-12'
		],
		[
			'name' => 'author_name',
			'label' => 'Nome do autor',
			'type' => 'text',
			'rules' => 'trim',
			'showOnTable' => true,
			'col' => 'col-md-12'
		],
		[
			'name' => 'author_function',
			'label' => 'Cargo/Empresa do autor',
			'type' => 'text',
			'rules' => 'trim',
			'showOnTable' => true,
			'col' => 'col-md-12'
		],
		[
			'name' => 'author_image',
			'label' => 'Image',
			'type' => 'image',
			'rules' => 'trim',
			'col' => 'col-md-12'
		],
		[
			'name' => 'sort_position',
			'label' => 'Ordenação',
			'type' => 'number',
			'showOnTable' => true,
			'rules' => 'trim',
			'col' => 'col-md-4'
		]
	];

	function __construct () {
		parent::__construct();
	}
}