<?php

declare(strict_types=1);

namespace {{ tree.getFullNameSpaceOfFile(file, entity, action) }};

{% for dependency in dependencyzz %}
use {{ dependency }};{% endfor %}
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;

/**
 * this file is generated by Laravel-Builder, do not modify it manually.
 * please do modifications in child class.
 *
 *{% for property in propertyzz %}
 * @property {{ property }}{% endfor %}
 *{% for property in przz %}
 * @property {{ property }}{% endfor %}
 */
class {{ helper.getClassName(file, entity, action) }} extends AbstractModel
{

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = '{{ entity.table if entity.table else entity.name }}';

    /**
     * The attributes that should be cast.
     *
     * @var array<string, string>
     */
    protected $casts = [
{% for nc in castzz %}
        '{{ nc[0] }}' => {{ nc[1] }},{% endfor %}
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array<int, string>
     */
    protected $hidden = [
{% for column in columnzz | selectattr('hidden') %}
        '{{ column.name }}',{% endfor %}
    ];

    /**
     * @return string[]
     */
    public static function getKeyzz(): array
    {
        return [
{% for key in columnzz | rejectattr('hidden') | rejectattr('wo') %}
            '{{ key.name }}',{% endfor %}
        ];
    }

{% for relation in relationzz %}
{{ relation }}{% endfor %}

}
