<?php

return [
    "type"           => "cpv",
    "model"          => App\Models\Cpv::class,
    "label"          => "content_types.cpv_plural",
    "label_singular" => "content_types.cpv_singular",
    "group"          => "competitions",
    "search"         => [
        "title" => "title",
        "fields" => [
            "title",
            "common_name",
        ],
        "relations" => [
        ],
    ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "full_code",
            "label"         => "Full code",
            "type"          => "textBox",
            "maxLength"     => 15,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:15",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "code",
            "label"         => "Code",
            "type"          => "textBox",
            "maxLength"     => 8,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:8",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "migration_object_id",
            "label"         => "Migration Object",
            "type"          => "textBox",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|integer",
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
