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

class Services extends AdminGodController {
	protected $model = 'ServiceModel';
	protected $names = [
		'singular' => 'Serviço',
		'plural' => 'Serviços',
		'link' => 'services',
	];
	protected $uploadFolder = 'services';
	protected $permissions = [
		'create' => true,
		'update' => true,
		'delete' => true
	];

	protected $fields = [
		[
			'name' => 'id',
			'label' => 'Id',
			'type' => 'hidden',
			'showOnTable' => false,
			'rules' => 'trim',
		],
		[
			'name' => 'title',
			'label' => 'Título',
			'type' => 'text',
			'rules' => 'trim|required',
			'required' => true,
			'slug' => true,
			'showOnTable' => true,
			'col' => 'col-md-12'
		],
		[
			'name' => 'text',
			'label' => 'Texto',
			'type' => 'textarea',
			'rules' => 'trim|required',
			'required' => true,
			'class' => 'summernote',
			'col' => 'col-md-12'
		],
		[
			'name' => 'image',
			'label' => 'Imagem',
			'type' => 'image',
			'showOnTable' => true,
			'rules' => 'trim|required',
			'col' => 'col-md-12'
		],
		[
			'name' => 'sort_position',
			'label' => 'Ordenação',
			'type' => 'number',
			'rules' => 'trim',
			'showOnTable' => true,
			'col' => 'col-md-4'
		],
	];

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