<?php

    return [
        "type"           => "products",
        "model"          => App\Models\Product::class,
        "label"          => "Produtos",
        "label_singular" => "Produto",
        "hierarchic"     => false,
        "group"          => "outros",
        "order"          => true,
        "baseUri"        => [
            "pt" => "/produtos",
            "en" => "/products",
        ],
        "fields"         => [
            [
                "name"          => "title",
                "label"         => "Título",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:255",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "description",
                "label"         => "Descrição",
                "type"          => "textArea",
                "multiLanguage" => true,
                "preValidation" => "trim",
                "validation"    => "required",
            ],
            [
                "name"          => "merchant",
                "label"         => "Comerciante",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:255",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "email",
                "label"         => "Email",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => false,
                "preValidation" => "trim",
                "validation"    => "email|max:255",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "website",
                "label"         => "Website",
                "type"          => "textBox",
                "maxLength"     => 500,
                "multiLanguage" => false,
                "preValidation" => "trim",
                "validation"    => "url|max:500",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "telephone",
                "label"         => "Telephone",
                "type"          => "textBox",
                "multiLanguage" => false,
                "preValidation" => "trim",
                "validation"    => "string|max:50",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "location",
                "label"         => "Localização",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:255",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"          => "address",
                "label"         => "Morada",
                "type"          => "textBox",
                "maxLength"     => 255,
                "multiLanguage" => true,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "max:255",
                "inList"        => true,
                "search"        => true,
                "sort"          => true
            ],
            [
                "name"      => "thumbnail",
                "label"     => "Imagem de Produto",
                "type"      => "mediaPicker",
                "mediaType" => "image",
            ],
        ],
        "actions"        => [
            "insert", "order", "preview", "edit", "delete"
        ]
    ];
