<?php

use App\Models\SubPlanOption;

return [
    "type"           => "sub_plan_option",
    "model"          => SubPlanOption::class,
    "label"          => "content_types.sub_plan_option_plural",
    "label_singular" => "content_types.sub_plan_option_singular",
    "hierarchic"     => FALSE,
    "group"          => "none",
    "parent" => array(
        "field"         => "sub_plan_id",
        "contentType"   => "sub_plan"
    ),
    "search"         => null,
    "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"          => "seats",
            "label"         => "Seats",
            "type"          => "textBox",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable",
        ],
        [
            "name"          => "price",
            "label"         => "Price",
            "type"          => "textBox",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required",
        ],
        [
            "name"          => "periodicity",
            "label"         => "Periodicity",
            "type"          => "textBox",
            "maxLength"     => 45,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:45",
        ],
        [
            "name"          => "subscription_plan_option_id",
            "label"         => "Subscription Plan Option",
            "type"          => "selectBox",
            "selectModel"   => [
                "endpoint" => 'subscription-plan-options/auto-complete',
            ],
            "mandatory"     => FALSE,
            "preValidation" => "trim",
        ],
    ],
    "actions"        => [
        "edit", "insert", "delete"
    ]
];
