<?php

/**
 * 查询/保存CommonConst数据
 */

namespace Game\Logic;

use Framework\DB\Handler\CommonDBHandler;
use Game\Constant\DBTableDefine;

trait CommonConstLogic
{
    use CommonDBHandler;

    //获取全部CommonConst数据
    public function getCommonConstData(): array
    {
        $result = array();
        $this->searchCommonTitle(
            DBTableDefine::TABLE_COMMON_CONST,
            0,
            $result
        );
        return $result;
    }

    public function saveCommonConstData(array $data): bool
    {
        return $this->updateCommonTitle(
            DBTableDefine::TABLE_COMMON_CONST,
            0,
            $data
        );
    }
}
