<?php
/* Smarty version 5.4.3, created on 2025-02-11 09:46:46
  from 'file:table.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.3',
  'unifunc' => 'content_67aaac064e27b4_70573667',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '01c9f463c13d73a9cb559ea1ef8585f078eb46ae' => 
    array (
      0 => 'table.tpl',
      1 => 1737453212,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_67aaac064e27b4_70573667 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = 'D:\\code\\other\\php-table2class';
echo '<?php'; ?>

/**
 * Created by FFB.
 * Company: Shenzhen Zhixun Information Tec. Nanchang Com.
 * Copyright: ShenzhenZhixun
 * Email: eastbus@126.com
 * User: FFB
 * Date: <?php ob_start();
echo $_smarty_tpl->getValue('map')['datetime'];
$_prefixVariable1 = ob_get_clean();
echo $_prefixVariable1;?>

 * Desc: <?php ob_start();
echo $_smarty_tpl->getValue('map')['desc'];
$_prefixVariable2 = ob_get_clean();
echo $_prefixVariable2;?>
  
 * 文件不允许修改，自动生成
 */
namespace <?php ob_start();
echo $_smarty_tpl->getValue('namespace');
$_prefixVariable3 = ob_get_clean();
echo $_prefixVariable3;?>
;

<?php
$__section_tmp_0_loop = (is_array(@$_loop=$_smarty_tpl->getValue('use')) ? count($_loop) : max(0, (int) $_loop));
$__section_tmp_0_total = $__section_tmp_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_tmp'] = new \Smarty\Variable(array());
if ($__section_tmp_0_total !== 0) {
for ($__section_tmp_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_tmp']->value['index'] = 0; $__section_tmp_0_iteration <= $__section_tmp_0_total; $__section_tmp_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_tmp']->value['index']++){
ob_start();
echo $_smarty_tpl->getValue('use')[($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)];
$_prefixVariable4 = ob_get_clean();
echo $_prefixVariable4;?>

<?php
}
}
?>

class <?php ob_start();
echo $_smarty_tpl->getValue('map')['className'];
$_prefixVariable5 = ob_get_clean();
echo $_prefixVariable5;?>
 extends <?php ob_start();
echo $_smarty_tpl->getValue('extends');
$_prefixVariable6 = ob_get_clean();
echo $_prefixVariable6;?>
 {
    public static function tableName()
    {
        return '{{<?php ob_start();
echo $_smarty_tpl->getValue('map')['table'];
$_prefixVariable7 = ob_get_clean();
echo $_prefixVariable7;?>
}}';
    }

    <?php
$__section_tmp_0_loop = (is_array(@$_loop=$_smarty_tpl->getValue('map')['columns']) ? count($_loop) : max(0, (int) $_loop));
$__section_tmp_0_total = $__section_tmp_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_tmp'] = new \Smarty\Variable(array());
if ($__section_tmp_0_total !== 0) {
for ($__section_tmp_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_tmp']->value['index'] = 0; $__section_tmp_0_iteration <= $__section_tmp_0_total; $__section_tmp_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_tmp']->value['index']++){
?>
/** ------------ 字段 <?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable8 = ob_get_clean();
echo $_prefixVariable8;?>
 ------------ */
    /**
     * <?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable9 = ob_get_clean();
echo $_prefixVariable9;?>
字段筛选, 表字段注释: <?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['comment'];
$_prefixVariable10 = ob_get_clean();
echo $_prefixVariable10;?>

     */
    public function filterBy<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['nameHumpH'];
$_prefixVariable11 = ob_get_clean();
echo $_prefixVariable11;?>
($val): self
    {
        $this->filterByColumn("<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable12 = ob_get_clean();
echo $_prefixVariable12;?>
", $val);
        return $this;
    }

    /**
     * 设置<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable13 = ob_get_clean();
echo $_prefixVariable13;?>
字段, 表字段注释: <?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['comment'];
$_prefixVariable14 = ob_get_clean();
echo $_prefixVariable14;?>

     */
    public function set<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['nameHumpH'];
$_prefixVariable15 = ob_get_clean();
echo $_prefixVariable15;?>
($val): self
    {
        if(!isset($this-><?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable16 = ob_get_clean();
echo $_prefixVariable16;?>
) || $this-><?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable17 = ob_get_clean();
echo $_prefixVariable17;?>
 != $val){
            $this->setColumns[] = "<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable18 = ob_get_clean();
echo $_prefixVariable18;?>
";
        }
        $this->setAttr("<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable19 = ob_get_clean();
echo $_prefixVariable19;?>
", $val);
        return $this;
    }

    /**
     * 获取<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable20 = ob_get_clean();
echo $_prefixVariable20;?>
字段, 表字段注释: <?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['comment'];
$_prefixVariable21 = ob_get_clean();
echo $_prefixVariable21;?>

     */
    public function get<?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['nameHumpH'];
$_prefixVariable22 = ob_get_clean();
echo $_prefixVariable22;?>
()
    {
        return $this-><?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable23 = ob_get_clean();
echo $_prefixVariable23;?>
 ?? null;
    }

    <?php if ($_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['isPri']) {?>
/**
     * 获取主键值
     */
    public function getPrimaryValue()
    {
        return $this-><?php ob_start();
echo $_smarty_tpl->getValue('map')['columns'][($_smarty_tpl->getValue('__smarty_section_tmp')['index'] ?? null)]['name'];
$_prefixVariable24 = ob_get_clean();
echo $_prefixVariable24;?>
 ?? null;
    }
    <?php }?>

    /** ----------------------------------------------- */


    <?php
}
}
?>

    /**
     * 获取<?php ob_start();
echo $_smarty_tpl->getValue('map')['table'];
$_prefixVariable25 = ob_get_clean();
echo $_prefixVariable25;?>
表所有字段, 返回字段MAP
     */
     public function getAttr(): array
     {
        if(empty($this->setColumns)){
            return [];
        }
        $res = [];
        foreach($this->setColumns as $column){
            $res[$column] = $this->{$column};
        }
        return $res;
     }
}<?php }
}
