<?php

use App\Models\User;

return [
    "type"           => "result_author",
    "model"          => App\Models\ResultAuthor::class,
    "label"          => "content_types.result_author_plural",
    "label_singular" => "content_types.result_author_singular",
    "hierarchic"     => FALSE,
    "group"          => "none",
    "parent" => array(
        "field"         => "result_entity_id",
        "contentType"   => "result_entity"
    ),
    "search"         => [
        "title" => "title",
        "fields" => [
            "title",
        ],
        "relations" => [
        ],
    ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "content_types.name",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:255",
        ],
        [
            "name"          => "user_id",
            "label"         => "content_types.user",
            "type"          => "selectBox",
            "selectModel"   => [
                "endpoint" => 'content/users/auto-complete',
            ],
            "mandatory"     => TRUE,
            "preValidation" => "trim",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
