<?php

namespace Tool\LoadTemplate\Logic;

use Game\Constant\ConstTemplate\TemplateScoreFrom;
use Tool\LoadTemplate\ILogic;

class ScoreFromLogic extends ILogic
{
    public function dealKey($key, $val, &$title): bool
    {
        $title [$key] = $val;
        return true;
    }

    /**
     * @param $row
     * @return bool
     * 需要字段转为int
     */
    public function dealRow(&$row): bool
    {
        $row[TemplateScoreFrom::Id] = (int)$row[TemplateScoreFrom::Id];
        $row[TemplateScoreFrom::Type] = (int)$row[TemplateScoreFrom::Type];
        $row[TemplateScoreFrom::ItemId] = (int)$row[TemplateScoreFrom::ItemId];
        $row[TemplateScoreFrom::ScoreNum] = (int)$row[TemplateScoreFrom::ScoreNum];
        return true;
    }

    public function dealFile(&$file): bool
    {
        return true;
    }

    public function getTidyList(): array
    {
        return array();
    }
}