static function LastTemplateLog($moduleType, $template)
    {
        $tblLogTemplate = \App\Phine\Database\Core\LogTemplate::Schema()->Table();
        $tblLogItem = LogItem::Schema()->Table();
        $sql = Access::SqlBuilder();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblLogItem->Field('Changed')));
        $joinCond = $sql->Equals($tblLogTemplate->Field('LogItem'), $tblLogItem->Field('ID'));
        $where = $sql->Equals($tblLogTemplate->Field('Template'), $sql->Value($template))
                ->And_($sql->Equals($tblLogTemplate->Field('ModuleType'), $moduleType));
        return LogItem::Schema()->First($where, $orderBy, null, $sql->Join($tblLogTemplate), JoinType::Inner(), $joinCond);
    }